This article has been updated to see
Windows environment configuration xdebug Debugging PHP Windows environment
Or
NetBeans configuration xdebug remote debugging PHP Linux Environment
Nebeans configuration Xdebug can facilitate our step-by-step view of the operation of the program is very advantageous to our debugging program is the following I will introduce the process of configuration.
to install Xdebug first, you can refer to this: http://blog.csdn.net/21aspnet/article/details/6753794
Locate the php.ini in the phpinfo () information and open php.ini Add the following code at the end of the document:
Xdebug.remote_enable=on
Xdebug.remote_handle=dbgp
Xdebug.remote_host=localhost
xdebug.remote_port=9001
Find tools in NetBeans menu---option will pop up a box will appear a Web browser to choose Firefox or IE and then find and PHP in the same line of the box click PHP then you will see a general, Unit test, Symfony , click on the General page to find the debugger port to write the port as in your php.ini configuration of the same port to determine.
Open your own project file in NetBeans find a line set to a breakpoint,
Then select Debug File NetBeans
A running netbeans-xdebug prompt appears in the lower-right corner and then F7 to see how the program is going to run next.
Take the following code as an example:
$a =array (' AA ', ' BB ', ' cc ');
$a [3]= "DD";
For ($i =0 $i <4; $i + +)
{
echo $a [$i]. " </br> ";
}
Start debugging, press F7 Single Step debugging
Right-click to add monitoring on variables that need to be monitored
See very clearly in the Watch window: