SublimeTextXdebug icon indicating copy to clipboard operation
SublimeTextXdebug copied to clipboard

Breakpoints are not working, but Debug.log seems fine

Open Jace25 opened this issue 11 years ago • 6 comments

Hi,

im running sublime text on my mac with a local webserver. I am working with sublime directly on this webserver.

If i try to set a breakpoint, sublime nerver stops at this breakpoint. Only a fatal error causes sublime to display the current content of my vars, so i think basically my settings are correct.

I wonder about this log entry and think this could cause the described behavior: <- breakpoint_set -i 5 -n 81 -f file%3A///Library/WebServer/Documents/app/src/ACME/Bundle/ReceiverBundle/Parser/XMLParser.php -t line -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="96110001"></response>

The correct command should something like breakpoint_set -i 5 -n 81 -f file://Library/WebServer/Documents/app/src/ACME/Bundle/ReceiverBundle/Parser/XMLParser.php -t line i think?

It would be great if someone could help me out here, regards Jacob

Edit: It breaks also, if i set break_on_start: true, but i am not able to step further into it or set an breakpoint in my index file.

My Project xdebug Settings:

"xdebug": 
{
    "url": "http://acme.local/",
    "close_on_stop": true,
    "max_children": -1,
    "max_depth": 25,
    "debug" : true,
    "break_on_start": true
}

I am using SublimeText3, all Plugins from PackageControl on a MacBook with Yosemite

Jace25 avatar Oct 17 '14 06:10 Jace25

I seem to be having the same issue. Did you ever figure it out or is it a true bug?

digitalfiz avatar Oct 27 '14 14:10 digitalfiz

I dont really know. I have tried many things like hacking the plugin and hardcode the pathes and something like this.

At least i figured out, that setting break_on_start=true, "run to line" from the xdebug context menu works. If i haven't set any other breakpoints it will run to the selected line and breaks. Thats not 100% debugging, but better than nothing, so for now i am happy with that.

Jace25 avatar Oct 27 '14 16:10 Jace25

+1 on OSX

macedd avatar Dec 28 '14 00:12 macedd

Run to Line after break on start doesnt work either

<- breakpoint_set -i 12 -n 31 -t line -f file%3A///Users/thiago/Sites/wp-evolui/htdocs/wp-content/themes/evolui/pwrapper/modules/core/filter/engine.php
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="16000057"></response>

Is file%3A// expected?

macedd avatar Dec 28 '14 00:12 macedd

I was having issues with breakpoints not being hit too. Break on start would work, but stepping over or running caused the script to finish running, and not stop on any break points. I compared the local log from this package and the remote log by xdebug. They were both virtually the same and had the same paths for break points. I even tried updating xdebug to 2.3.1 but that didn't change anything.

Exhausted, I decided to remove the package, open and close Sublime, then re-install the package (knowing my user.settings would be preserved). That fixed it for me. I wonder if it's some type of cache problem with SublimeTextXdebug? Breakpoints were working earlier today for me and then stopped working for no apparent reason (I made no changes to the package settings or to xdebug on the remote server). It's something easy to try if you haven't already.

Edit: Also wanted to add that file%3A is in my log file when setting breakpoints and it's working fine, so I don't think that's a problem.

Toddicon avatar Mar 07 '15 00:03 Toddicon

Turns out reinstalling the package actually did not fix it.

I think my issue might be unique from this issue. I have two path mappings for the server that map to one local path. One of them always works. The other mapping only works when I comment out the other. The order of the path maps doesn't matter.

Toddicon avatar Mar 09 '15 22:03 Toddicon