Question

I know this is repeated question. But I am not able to fix my problem even after going through all the posts. I am trying to debug the php on net beans. But it does not stop on first line or not even on break point. Below is the configuration I am using.

[xdebug]
zend_extension="g:/php/ext/php_xdebug-2.0.4-5.2.8-nts.dll"
xdebug.remote_enable = 1 
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost" 
xdebug.remote_port="9002" 
xdebug.remote_mode=req 
xdebug.idekey="netbeans-xdebug"

I also set the 9002 port in netbeans. It keeps on waiting to connect to xdebug and when I click on finish debugger session, it gives me below error.

enter image description here

I tried all possible solutions. But could not resolve the issue. Please help me to fix this. I am trying for last 3 days. :( :(

Was it helpful?

Solution

If you're using Zend Server, you need to make sure you load xDebug before zend extension manager.

extension_dir="C:\Program Files (x86)\Zend\ZendServer\lib\phpext"
zend_extension="C:\Program Files (x86)\Zend\ZendServer\lib\phpext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
zend_extension="C:\Program Files (x86)\Zend\ZendServer\lib\ZendExtensionManager.dll"

OTHER TIPS

Please check this. In your php.ini make sure all this options are enabled. Otherwise add it in the end of your php.ini file.

[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.default_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"

Check the path(/usr/lib/php5/20121212/) for xdebug.so in your file system accordingly change zend_extension value. Then restart your apache.

1st line zend_extension value is here for ubuntu users. I think that variable no need to change. Please uncheck the stop at First line(tools->options->php->Debugging).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top