Install xdebug debug PHP under Window

Source: Internet
Author: User

Xdebug is a PHP-oriented debugger and profiling tool. In addition to more debugging information, Xdubug can provide developers with a lot of information, such as: the memory consumption of PHP scripts, the total number of calls to a function, the time spent inside a function, and the full stack trace of a function.

Installing Xdubug

1. To download xdebug.org download the corresponding PHP version of the xdebug, to download the corresponding version of the line, or Xdebug installed not up. You can use Phpinfo () to view your PHP version.

Download the corresponding Xdubug according to the PHP version

V6 or V9

If you use PHP under Apache1 or apache2, you should choose the VC6 version;

If you use PHP under IIS you should choose the VC9 version;

The version of VC6 is compiled with Visual Studio6, VC9 compiled with Visual Studio 2008, and improves performance and stability.

VC9 version of PHP requires you to install the Microsoft C + + Runtime, do not use the VC9 version under Apache.

TS or NTS

On the interface of the Phpinfo () function: Thread Safety, Disabled is nts,enabled is TS

2. Download the DLL file into the PHP extension folder, and then reference the extension in the php.ini configuration file.

Open php.ini Add extension

, if your PHP version is 5.2 (file name is the downloaded filename)

Zend_extension_ts =d:/web/php/ext/php_xdebug-2.0.4-5.2.8.dll

If your PHP version is 5.3 used (file name is the downloaded filename)

zend_extension=d:/web/php/ext/php_xdebug-2.1.2-5.2-vc6.dll  

[Xdebug]
Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on
Xdebug.trace_output_dir= "D:/xdebuglog"
Xdebug.profiler_enable=on
Xdebug.profiler_output_dir= "D:/xdebuglog"

3. Restart Apache to view phpinfo (); The following flag indicates that the installation was successful.

Some other configuration instructions:

xdebug.collect_vars = on ; whether to collect return values

xdebug.collect_return = on , whether to collect parameters

xdebug.collect_params = on ; trace Output Path

xdebug.trace_output_dir="D:/xdebuglog" ; whether to open debug content

xdebug.profiler_enable= on ; debug output Path

Xdebug.profiler_output_dir = "D:/xdebuglog"   

xdebug.auto_trace = on , whether automatic tracking is turned on   

xdebug.show_exception_trace = on ; whether to turn on remote debugging auto-Start

xdebug.remote_autostart = on ; whether to turn on remote debugging

xdebug.remote_enable = on ; Allow client IP to debug

xdebug.remote_handler= dbgp ; whether to collect variables

Xdebug.max_nesting_level  =  - maximum cycle or debug times to prevent dead loops

xdebug.dump_once  =  on   

xdebug.dump_globals  =  on   

xdebug.dump_undefined  =  on   

Xdebug.dump.SERVER  =  Request_method , Request_uri,http_user_agent

Xdebug.dump.REQUEST =*  

Xdebug.show_exception_trace  =  on exception tracking will still be enforced

Xdebug.show_local_vars  =  1 all local variables in the outermost part of each function call will be printed, including variables that have not been initialized

xdebug.var_display_max_depth  =  6 represents the depth of the dump of a complex variable.

Install xdebug debug PHP under Window

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: info-contact@alibabacloud.com 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.