PHP, Software Development

Configure Netbeans to Debug PHP Web Applications

Figuring out how to configure NetBeans, xdebug, PHP, and Apache to enable debugging did not come by easily despite the myriad references available online. However, most (if not all)  of them are outdated and inaccurate. As a result, they tend to obscure a rather simple configuration or how-to.

Software Applications Used

  1. WinXPSP3 on a virtual machine (e.g., VirtualBox)
  2. XAMPP 1.7.7
  3. Microsoft Visual C++ 2008 Redistributable
  4. Netbeans-7.0.1 For PHP
  5. Jdk 1.6 update 21

Install XAMPP, C++ binaries, JDK1.6u21, and Netbeans 7.

Step 1 – Configure PHP and start Apache

Add the following line  in php.ini:

 Step 2 – Create a PHP project in Netbeans


Step 2a – Choose PHP Application


Step 2b – Choose PHP5.3


Step 2c – Local Web Server refers to our installed Apache


We will use just one PHP page

Step 3 – Put some codes in index.php and place some breakpoints


Some PHP Codes

Step 4 – Test the code


Test Sample Codes

Step 5 – Configure NetBeans


Configure NetBeans

Step 6 – Debug Code












Debug some codes.

You Might Also Like