Xdebug is an open-source PHP program debugger (a debug tool) that can be used to track, debug, and analyze the running status of PHP programs.
Windows7 + iis7 + FastCGI + PhP5 + netbeans + xdebug debug PHP debugging
0. Install IIS in windows, and then use Microsoft Web platform installer to install FastCGI + PHP
1. Download xdebug and rename it php_xdebug.dll to the ext directory of PHP.
2. Set PHP. ini and add the following content:
[Xdebug]
Zend_extension = "C:/program files (x86)/PHP/EXT/php_xdebug.dll"
Xdebug. default_enable = on
Xdebug. auto_trace = on
Xdebug. collect_params = on
Xdebug. collect_return = on
Xdebug. max_nesting_level = 100
Xdebug. profiler_enable = on
Xdebug. remote_enable = on
Xdebug. remote_host = localhost
Xdebug. remote_port = 9000
Xdebug. remote_handler = dbgp
Xdebug. trace_output_dir = "C:/Windows/Temp"
Xdebug. profiler_output_dir = "C:/Windows/Temp"
Zend_extension is the actual storage path of php_xdebug.dll.
Xdebug. trace_output_dir and xdebug. profiler_output_dir are your favorite paths.
3. Restart IIS. Iis7.0 must use the Internet Information Service (IIS) manager to restart the web service. The method used to restart the IIS Admin Service as before is invalid.
4. Use the phpinfo () function to check whether an xdebug project exists. If so, xdebug is successfully installed.
5. Start netbeans
5.1 create and open a project
5.2 open the file to be debugged and set the breakpoint.
5.3 execute debugging in the top menu bar-> debug "XXX. php" and select "server-side PHP" in the pop-up dialog box ". After you click OK, Nb automatically uses your default browser to open the file you want to debug. At this time, you will find that the browser's request has not been returned, and the bottom right corner of Nb shows "netbeans-xdebug is running", you can follow F7 normal single step to run the debugging program.
If no breakpoint is set, the program will automatically pause execution in the first line of the current file when debugging is executed.
If you do not want to automatically pause the execution, deselect the tool-> Option-> PHP-> stop on the first line.