Sublime Forum

SublimeTextXdebug [ST2/3]

#1

I would like to share with you SublimeTextXdebug, a Xdebug debugger client integration for Sublime Text 2 and 3.
Which allows you to debug PHP scripts via Xdebug (DBGp) protocol within Sublime Text.

For more information and source:
github.com/martomo/SublimeTextXdebug

0 Likes

#2

Looks really nice.
I’ll try it out.

Just one thing: You can’t define different URLs for different Projects?

Or is it possible to configure this inside the project settings too?

0 Likes

#3

[quote=“layne”]
Just one thing: You can’t define different URLs for different Projects?

Or is it possible to configure this inside the project settings too?[/quote]

You can also define the URL, port, IDE key and path mapping for each project.
Configure it under the ‘xdebug’ key in your .sublime-project file, as shown below.

{
    "folders":
    
        {
            "path": "..."
        },
    ],

    "settings": {
        "xdebug": {
            "path_mapping": {
                "/path/to/file/on/server" : "/path/to/file/on/computer",
                "/var/www/htdocs/example/" : "C:/git/websites/example/"
            }
            "ide_key": "your_custom_ide_key",
            "url": "http://your.web.server",
            "port": 9000
        }
    }
}
0 Likes

#4

This package has been added to the Package Control repository under the name Xdebug Client.

0 Likes

#5

Can anyone clear this up for me, please? Have been Struggling to connect xdebug to sublime text for years. In the path_mapping section of project settings, how is the key different from the value? I understand the value maps to my project folder, but what does the key represent? “var/www/htdocs/example”, is this supposed to be the index file for the project or the path to wamp installation? Please help me

0 Likes

#6

This seems to be the last piece of the puzzle. I am connected, but get a [Step Debug] WARN: Breakpoint file name does not exist: /home/username/dev/drupal/web/index.php (No such file or directory) message …

0 Likes