Xdebug is a PHP-oriented debugger and profiling tool. In addition to more debugging information, Xdubug can also provide developers with a lot of information, such as: memory consumption of PHP scripts, total number of calls to a function, and time spent inside the function; trace the full stack of a function. Install Xdubug1. download xdebug.org from the official website to download the corresponding PHP
Xdebug is a PHP-oriented debugger and profiling tool. In addition to more debugging information, Xdubug can also provide developers with a lot of information, such as: memory consumption of PHP scripts, total number of calls to a function, and time spent inside the function; trace the full stack of a function. Install Xdubug 1. Download xdebug.org from the official website to download the corresponding PHP
Xdebug is a PHP-oriented debugger and profiling tool. In addition to more debugging information, Xdubug can also provide developers with a lot of information, such as: memory consumption of PHP scripts, total number of calls to a function, and time spent inside the function; trace the full stack of a function.
Install Xdubug
1. Download xdebug.org from the official website to download xdebug of the corresponding PHP version. You must download the corresponding version. Otherwise, xdebug cannot be installed. You can use phpinfo () to view your PHP version.
Download the corresponding Xdubug Based on the php version
V6 or V9
If you use PHP in apache1 or apache2, you should select VC6;
If you use PHP in IIS, you should select the version of VC9;
VC6 is compiled using visual studio6, VC9 is compiled using Visual Studio 2008, and performance and stability are improved.
For PHP of VC9, you need to install Microsoft 2008 C ++ Runtime. Do not use the version of VC9 in apache.
TS or NT
In the phpinfo () function interface, check that the Thread Safety, disabled is ETS, and enabled Is TS.
2. Download and copy the dll file to the PHP extension folder, and then reference the extension in the php. ini configuration file.
Open php. ini and add Extension
If your php version is 5.2 (the file name is the downloaded file name)
Zend_extension_ts = d: // web/php/ext/php_xdebug-2.0.4-5.2.8.dll
If your PHP version is 5.3 (the file name is the downloaded file name)
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 and check phpinfo (). The following mark indicates that the installation is successful.
Other configuration instructions:
Xdebug. collect_vars = On; Whether to collect return values
Xdebug. collect_return = On; Whether to collect Parameters
Xdebug. collect_params = On; tracks the output path
Xdebug. trace_output_dir = "D:/xdebuglog"; Whether to enable debugging content
Xdebug. profiler_enable = On; debug output path
Xdebug. profiler_output_dir = "D:/xdebuglog"
Xdebug. auto_trace = On; Whether to enable automatic tracing
Xdebug. show_exception_trace = On; Whether to enable remote debugging and automatic start
Xdebug. remote_autostart = On; Whether to enable remote debugging
Xdebug. remote_enable = On; Client IP address that can be debugged
Xdebug. remote_handler = dbgp; Whether to collect Variables
Xdebug. max_nesting_level = 50 maximum cycles or debugging times to prevent endless 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 will still force exception tracking
Xdebug. show_local_vars = 1 print all local variables in the periphery of each function call, including uninitialized variables.
Xdebug. var_display_max_depth = 6 indicates the depth of complex variables.