Viewed   384 times

I am currently trying to get Xdebug to work on our development server. As client I am using netbeans and the connection so far works without problems. But when I try to set a breakpoint within netbeans it is just getting ignored.

And yeah, I already googled for hours and also found some questions here that perfectly fit my description: SO 1 SO 2

But this does not seem to solve it for me. The Xdebug module is loaded via zend_extension=path/to/xdebug. so in the


I also looked at the php5/apache and php5/cli php.ini to make sure it is not loaded with extension= somewhere there. I also checked the "additional .ini files parsed" found by phpinfo() and it seems to be nowhere else loaded.

By executing php -m I can see the loaded Xdebug module in

[PHP Modules]

and in

[Zend Modules]

Not sure if this indicates that it is still loaded twice or if it is fine like that? Still if I remove the zend_extension=/path/to/ from the conf.d/xdebug.ini it is also no longer loaded. So I really assume it is only loaded there.

If I set the remote_log option is see that Netbeans is trying to set something:

<- breakpoint_set -i 452 -t line -s enabled 
   -f file:///http:/ -n 15
-> <response xmlns="urn:debugger_protocol_v1"
    xmlns:xdebug="" command="breakpoint_set" 
          transaction_id="452" state="enabled" id="258870001">   

But it seems to have no effect (looks pretty much the same like in the other SO questions I have posted above. But if i do a manual xdebug_break() inside the php code it handels it properly.

PHP Version is 5.2.6 and Xdebug is 2.1. Any suggestions where I could have a look next?



It looks like there is something wrong with the path to the file containing the breakpoint.

<- breakpoint_set -i 452 -t line -s enabled 
   -f file:///http:/ -n 15 ->

I've had a similar problem with Eclipse. Only my breakpoints in the index file were accepted and breakpoints in other files—that were included in the index—were ignored.

I looked in the remote_log file and saw the following:

<- breakpoint_set -i 260 -t line 
   -f file:///~jeroen/workspace/fieg/wp-content/plugins/fieg/fieg.php -n 22-> 
<response xmlns="urn:debugger_protocol_v1" 
   xmlns:xdebug="" command="breakpoint_set" 
   transaction_id="260" id="48060002"></response>

I noticed that the path for the breakpoint was all wrong. It turned out that I had to setup Port Mapping in Eclipse. After setting the correct mapping the breakpoints started working. Also my remote_log now shows the correct path:

<- breakpoint_set -i 333 -t line 
   -f file:///Users/jeroen/Workspace/fieg/wp-content/plugins/fieg/fieg.php -n 12->     
<response xmlns="urn:debugger_protocol_v1" 
   xmlns:xdebug="" command="breakpoint_set" 
   transaction_id="333" id="48080005"></response>

I'm not sure if there is an equivalent of the Eclipse Port Mapping configuration in Netbeans, but hopefully I pointed you in the good direction.

Wednesday, September 14, 2022

This is problem in Eclipse SR1. You should switch back to R (SR0) release, next you can install PDT 3.3.1 from marketplace.

See also bug report on bugzilla


Problem is fixed in nightly builds:

Edit 2:

We released new stable (3.3.2) version with fix for this problem. You can find it on marketplace or in this update site:

Wednesday, November 2, 2022

Xdebug (through PHP) doesn't support symbolic links yet (there is an issue at PHP/Xdebug always uses the fully expanded link so you will need to make sure netbeans sets up a breakpoint like:

breakpoint_set -i 1014 -t line -s enabled -f file:///common/rsync/Dropbox/active-archives/code/Locus/mockup/test.php

You will have to set-up a path mapping. After you've verified that the breakpoint_set include the correct path, it should work.

Monday, August 15, 2022

I have since found that WAMP, when installed with Mod_rewrite and cURL cannot cope with Xdebug.

It is a known error and crashes everytime.

Unfortunately, I am using these 2 libraries too.

Saturday, October 15, 2022

Sorry, i can't comment anymore. @David @JamesB41: I've been looking for this too. My setup is a Windows 7 host with NetBeans 7.1, and an Ubuntu VM in VirtualBox. I have the NetBeans project set up as a remote project, uploading and downloading using SFTP.

The following setup works for me, just use your host's IP as remote_host, and make sure the VM can see it.


NetBeans will stop at the entry point breakpoint (if you have the option set in PHP->Debugging). But, it won't stop on NetBeans-created breakpoints, because its running off the VM's files. You can use xdebug_break() though, and it will show stack and variables. It will stop at NetBeans breakpoints and highlight if you map the folders correctly in project config > Run Config > Advanced. Awesome. I am complete.

(The connect_back config didn't seem to help, possibly because $_SERVER['REMOTE_ADDR'] isn't populated.)

Monday, December 5, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :