Contents

Debugging in Ampps and Netbeans

Contents

Please read great article about installation and configuration debugging for PHP in Ampps server.

I just want to add some additional tips before you start downloading and installing files…

Determine you visual C runtime, architecture and thread safety

Open Ampps local control center and check PHP Info page.

/images/2015-09-13-23_17_18-phpinfo-243x300.png

Files are named with combination of used compiler (MSVC11 = VC11, MSVC9 = VC9), architecture (x86 = 32bit,  x64 = 64bit) and thread safety settings (TS = enabled).

With this information you should select proper DLL for download.

After downloading DLL file for your selected PHP configuration, you must copy file to “php/ext” folder and add  new config setting to php.ini file :

zend_extension="\php_xdebug.dll"

For debuging to work from Netbeans, you need to add this xdebug settings to php.ini file:

xdebug.remote_enable=1 xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 ; Port number must match debugger port number in ; NetBeans IDE Tools > Options > PHP xdebug.remote_handler=dbgp

Restart Apache and check phpInfo() in local ampps web admin page (http://localhost/ampps/).

/images/2015-09-13-23_31_42-phpinfo-300x43.pngAfter successful installation your breakpoints in PHP code should work as expected.

/images/2015-09-07-21_41_09-NetBeans-Platform-8.0.2-300x180.png

When you debug application, link to the application, get additional debug parameter:

http://localhost/webapp03/web/app_dev.php?XDEBUG_SESSION_START=netbeans-xdebug