martomo / SublimeTextXdebug

Xdebug debugger client for Sublime Text
MIT License
565 stars 89 forks source link

Xdebug ignores sublime breakpoints #168

Open maykino opened 7 years ago

maykino commented 7 years ago

Hello everyone, I've been trying to get it to work with no luck. I'm running a macOS Sierra, sublime 3 & vagrant. Here is my xdebug configuration:

[xdebug] zend_extension="/usr/lib/php/20131226/xdebug.so" xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=192.168.33.1 xdebug.remote_port=9000 xdebug.remote_autostart=1 xdebug.remote_log=/tmp/php5-xdebug.log xdebug.remote_connect_back=1

Here is my sublime configuration:

{ "folders": [ { "path": "." } ], "settings": { "xdebug": { "url": "http://lulu.erp/app_dev.php/", "path_mapping": { "/var/www/" : "/var/www/html/amazon-sales-tracker/",

        },
        "debug": true,
    }
}

}

When I do Xdebug->Start Debugging (Launch Browser) it doesn't stop on the breakpoint however the log file shows the following:

screen shot 2017-02-27 at 8 53 11 pm

Any ideas what could be wrong?

tchalvak commented 7 years ago

Use the config checker: https://xdebug.org/wizard.php If that doesn't work, I recommend triangulating by downloading PhpStorm and running it's configuration checker, as it will give you areas of the configuration that are non-working and help ascertain whether there is a problem with the -xdebug- configuration that doesn't deal with sublime configuration itself.

SpiderEvgn commented 7 years ago

I have exactly the same issue with you, hope somebody could provide a solution.

raszkiewicz commented 7 years ago

+1

Can Xdebug on Eclipse but Sublime ignores breakpoints

HariS3ldon commented 7 years ago

I have the same issue.. it seams this happen if you have Xdebug installed on a different machine (remote server, virtual machine...).

I tried many hours to find a configuration issue, then i tried with PhpStorm and it works perfectly.

riser101 commented 6 years ago

+1

sleepingmonk commented 6 years ago

I encountered this debugging remote in vagrant.

This thread helped me: https://github.com/martomo/SublimeTextXdebug/issues/39

If I set my path_mapping in the User Settings instead of in my .sublime-project file, it works.

Not ideal, but gets me back to work.

aneetkukreja1 commented 5 years ago

Check sublime terminal (Ctrl + ~) if it shows error like xdebug xml.etree.ElementTree.ParseError: not well-formed (invalid token) then it is issue of sublime xdebug client installed through sublime package manager.

  1. Uninstall xdebug client installed through Package manager Preferences > Package control > remove package > xdebug client

  2. Quit sublime

  3. Install client manually through source code Get fixed source code of xdebug client from https://github.com/gepeixoto/SublimeTextXdebug.git

    • Download source code (do not follow install instructions, just download raw source code)
    • Copy source code directory to sublime packages directory. In mac it is here /users/[username]/library/Application Support/Sublime Text 3/Packages/
alexkuc commented 5 years ago

This is a little embarrassing but in my case (was experiencing the same issue) I have mixed up the local and remote paths! Double check to make sure your first path is remote while the second path is local.