Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debugging won't stop at breakpoints

I'm having a problem with xdebug not stopping at breakpoints when using remote debugging (everything is fine when running scripts via the command line). It will break at the first line of the program, then exit, not catching any breakpoints.

It used to work fine, until I switched over to using MacPorts for Apache and PHP. I've tried re-compiling it several times (with several versions), but no dice.

I'm using PHP 5.3.1 and Xdebug 2.1.0-beta3

I've also tried at least 3 different debugging programs (MacGDBp, Netbeans and JetBrains Web IDE).

My php.ini settings look like:

[xdebug] xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_port=9000 xdebug.remote_host=localhost xdebug.idekey=webide 

And when I log the debugger output, setting a breakpoint looks like this/;

<- breakpoint_set -i 895 -t line -f file:///Users/WM_imac/Sites/wm/debug_test.php -n 13 -s enabled -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="895" state="enabled" id="890660002"></response>

When run, the debugger will get the context of the first line of the application, then send the detach and stop messages.

However, this line is output when starting the debugger.

<- feature_get -i 885 -n breakpoint_types -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="885" feature_name="breakpoint_types" supported="1"><![CDATA[line conditional call return exception]]></response>

Does 'line conditional call return exception' mean anything?

like image 886
Bryan M. Avatar asked Mar 01 '10 22:03

Bryan M.


People also ask

Why does Visual Studio not stop at breakpoint?

This problem occurs because ASP.NET debugging isn't enabled on the application.

Why are my breakpoints not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do I stop a Debug session?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.

What is a breakpoint in debugging?

Breakpoints are one of the most important debugging techniques in your developer's toolbox. You set breakpoints wherever you want to pause debugger execution. For example, you may want to see the state of code variables or look at the call stack at a certain breakpoint.


1 Answers

I had this problem and took me ages to find the answer.

In your debug config, in the server area, click Configure, go to Path Mapping, click the path that's there and click edit, change to Path in file system and navigate to the correct file.

Done.

like image 125
pitchandtone Avatar answered Oct 02 '22 19:10

pitchandtone