Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does xdebug not establish connection with NetBeans?

I try using xdebug with NetBeans to debug PHP. I start debug, and NetBeans waits for ever for a connection with xdebug. I have NetBeans 6.8 (latest version) with the latest MAMP package installed on my mac.

My php.ini looks like this:

[xdebug]
;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
like image 684
openfrog Avatar asked Dec 22 '09 14:12

openfrog


People also ask

How does Xdebug work?

When Xdebug is running, it will call back to your IDE (like PhpStorm or VS Code) from the server where it's running. Your IDE will sit and listen for that connection on a specific port (typically port 9000 or 9003).

What is Xdebug used for?

Xdebug is an extension for PHP, and provides a range of features to improve the PHP development experience. A way to step through your code in your IDE or editor while the script is executing. Writes every function call, with arguments and invocation location to disk.


1 Answers

Finally, I had to add the idekey value like this:

xdebug.idekey="netbeans-xdebug"

now it works :-)

like image 121
openfrog Avatar answered Sep 21 '22 08:09

openfrog