spyfinch
spyfinch

Reputation: 31

Sublime Text 3 (with Xdebug Client plugin) + Vagrant VM (Ubuntu)

Can't get work the xdebug on Ubuntu (that is Vagrant VM, and host is Windows 7.

xdebug configuration

[CUSTOM]
error_reporting=-1
session.save_path=/var/lib/php/session
date.timezone=America/Chicago
cgi.fix_pathinfo=1
display_errors=true
[XDEBUG]
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_log=/var/log/xdebug/xdebug.log
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.idekey=sublime.xdebug
xdebug.remote_port=9000
xdebug.remote_host=10.0.2.2
xdebug.remote_handler=dbgp

sublime project file:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "."
        }
    ],
    "settings": {
        "xdebug": {
            "path_mapping": {
                "/var/www/projectname/public" : "C:\\Users\\user\\vagrant\\ubuntu-projectname\\projectname\\public",
             },
             "url": "http://projectname.com/",
             "super_globals": true,
             "close_on_stop": true
        }
    }
}

Sublime shows blank Xdebug Context and Stack... What am I doing wrong?? Thanks for reply.

Upvotes: 2

Views: 2082

Answers (1)

spyfinch
spyfinch

Reputation: 31

Fixed by changing port 9000 to 9001 and turning off Windows 7 Firewall. And don't forget to change port in "Tools" -> "Xdebug" -> "Settings - User":

{
    "ide_key": "sublime.xdebug",
    "port": 9001,
}

+ don't forget to reboot Sublime Text after that!

Upvotes: 1

Related Questions