Windows7 + iis7 + FastCGI + PhP5 + netbeans + xdebug debug PHP debugging

Source: Internet
Author: User
Tags netbeans

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:


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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.