question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breakpoint is being ignore in certain XDebug Sessions.

See original GitHub issue

Hello, thank you for vdebug:

I have a remote xdebug session for a PHP project that fails to stop at a break point when using vim with vdebug but not when using phpstorm on the same machine with the same xdebug settings (I would prefer to use vim).

The issue seems to be that vdebug assumes that the project root is at /root/.composer/ because there are some dependencies there that get connected to first. However, the root of the project is actually /var/www. In phpstorm there is a configuration to ignore certain folders. And I can configure the session to essentially not stop at /root/.composer at all.

Yet, looking at the logs I can tell that vdebug does recognize the starting point, but then just some how forgets it:

- [Info] {Sat 20 2016 06:44:28} Searching for win by name /Users/dkinzer/projects/pluto/civic-1241-removes-hhs-merge-branches/docroot/includes/bootstrap.inc
- [Info] {Sat 20 2016 06:44:28} Win 1, name /Users/dkinzer/projects/pluto/civic-1241-removes-hhs-merge-branches/docroot/includes/bootstrap.inc
- [Info] {Sat 20 2016 06:44:28} Returning window number 1
- [Info] {Sat 20 2016 06:44:28} Found connection from ('192.168.99.100', 42030)
- [Debug] {Sat 20 2016 06:44:28} Command: feature_set -i 1 -n max_children -v 128
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_children" success="1"></response>
- [Info] {Sat 20 2016 06:44:28} Updated line number of breakpoint 11000 to 3183
- [Info] {Sat 20 2016 06:44:28} Registering 1 breakpoints with the debugger
- [Debug] {Sat 20 2016 06:44:28} Command: breakpoint_set -i 2 -t line -f file:///var/www/docroot/includes/bootstrap.inc -n 3183 -s enabled
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" state="enabled" id="3890001"></response>
- [Debug] {Sat 20 2016 06:44:28} Command: context_names -i 3
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="3"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
- [Debug] {Sat 20 2016 06:44:28} Available context names: {0: 'Locals', 1: 'Superglobals', 2: 'User defined constants'}
- [Debug] {Sat 20 2016 06:44:28} Command: step_into -i 4
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="4" status="break" reason="ok"><xdebug:message filename="file:///root/.composer/vendor/drush/drush/drush" lineno="112"></xdebug:message></response>
- [Info] {Sat 20 2016 06:44:28} Getting stack information
- [Debug] {Sat 20 2016 06:44:28} Command: stack_get -i 5
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="5"><stack where="{main}" level="0" type="file" filename="file:///root/.composer/vendor/drush/drush/drush" lineno="112"></stack></response>
- [Debug] {Sat 20 2016 06:44:28} Replacing remote path (/root/.composer) with local path (/Users/dkinzer/projects/.composer)
- [Debug] {Sat 20 2016 06:44:28} Replacing remote path (/root/.composer) with local path (/Users/dkinzer/projects/.composer)
- [Info] {Sat 20 2016 06:44:28} Moving to current position in source window
- [Info] {Sat 20 2016 06:44:28} Setting source file: /Users/dkinzer/projects/.composer/vendor/drush/drush/drush
- [Info] {Sat 20 2016 06:44:28} Placing pointer sign on line 112
- [Info] {Sat 20 2016 06:44:28} Getting Locals variables
- [Debug] {Sat 20 2016 06:44:28} Command: context_get -i 6 -c 0
- [Debug] {Sat 20 2016 06:44:28} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="6" context="0"><property name="$argv" fullname="$argv" address="139684477318704" type="array" children="1" numchildren="4" page="0" pagesize="128"><property name="0" fullname="$argv[0]" address="139684477318840" type="string" size="32" encoding="base64"><![CDATA[L3Jvb3QvLmNvbXBvc2VyL3ZlbmRvci9iaW4vZHJ1c2g=]]></property><property name="1" fullname="$argv[1]" address="139684477319112" type="string" size="14" encoding="base64"><![CDATA[LS1yb290PWRvY3Jvb3Q=]]></property><property name="2" fullname="$argv[2]" address="139684477319280" type="string" size="2" encoding="base64"><![CDATA[Y2M=]]></property><property name="3" fullname="$argv[3]" address="139684477319448" type="string" size="3" encoding="base64"><![CDATA[YWxs]]></property></property></response>
- [Info] {Sat 20 2016 06:44:28} Writing 5 properties to the context window
- [Debug] {Sat 20 2016 06:44:28} Writing to context window:
[ *Locals ] [ Superglobals ] [ User defined constants ]

- Locals at /Users/dkinzer/projects/.composer/vendor/drush/drush/drush:112

 ▾ $argv = (array [4])
  \
   ⬦ $argv[0] = (string [32]) `/root/.composer/vendor/bin/drush`
   |
   ⬦ $argv[1] = (string [14]) `--root=docroot`
   |
   ⬦ $argv[2] = (string [2]) `cc`
   |
   ⬦ $argv[3] = (string [3]) `all`
  /

- [Info] {Sat 20 2016 06:44:43} Running
- [Debug] {Sat 20 2016 06:44:43} Command: run -i 7
- [Debug] {Sat 20 2016 06:45:01} Closing the socket
- [Info] {Sat 20 2016 06:45:01} Connection to the debugger has been closed

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
andyrcommented, Mar 23, 2016

I see this occasionally as well and am not sure how to fix it. But as a workaround, I just set breakpoints programmatically with:

xdebug_break();

0reactions
dkinzercommented, Mar 30, 2016

As it turns out the issue I’m running into happens because the drush command invokes a forked process. And, vdebug fails to break because it cannot handle multiple debugging session. Sadly the xdebug_break() idea does not seem to help in this case.

Closing since this is essentially an symptom of #227

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xdebug ignores breakpoints - php - Stack Overflow
As client I am using netbeans and the connection so far works without problems. But when I try to set a breakpoint within...
Read more >
XDebug ignores breakpoints – IDEs Support (IntelliJ Platform)
When I set a break point, setup a debug session and load the page which is being debugged, the break point is ignored...
Read more >
Documentation » Step Debugging - Xdebug
Xdebug will initiate a debug session in the presence of the XDEBUG_SESSION HTTP ... and also introduce some basic conditional breakpoints.
Read more >
7.1. Debug Overview — Code Composer Studio 12.1.0 ...
Disable breakpoints on a free run: Disables all breakpoints when the Free Run option is used. For certain devices, Free Run is a...
Read more >
Enable and disable Edit and Continue - Visual Studio (Windows)
Learn how to disable and enable Edit and Continue in Visual Studio Options at design time. Edit and Continue works only in debug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found