[SOLVED] Update XDebug in MAMP to work with Netbeans (Mac OS X)

[Total: 1    Average: 4/5]
The MAMP stack from appsolute ships with an old version of XDebug that often causes the debugging sessions in Netbeans to crash, in particular when adding Watches and inspecting variables via tooltips.

Downloading and compiling a more recent version of XDebug would solve the problem, however it is a time consuming exercise that can be easily avoided. Here is how to do it.

Go to this address:

http://code.activestate.com/komodo/remotedebugging/

and download PHP Remote Debugging Client for Mac OS X (Universal).

Expand it and select xdebug.so within the proper version of PHP that you are using within MAMP and copy it to the no-debug-non-zts-20090626 folder (the date may change) in your MAMP installation.

For example, if you are using PHP 5.3, copy the xdebug.so from the 5.3 folder into MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/

Before doing so, you may want to rename the original xdebug.so into _xdebug.so or similar, just in case you need it back. You may have to restart both the MAMP stack and Netbeans for it to use the updated XDebug. Netbeans will start to utilize the “new” XDebug from the next debugging session.

Happy debugging!

You may also like

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *