Xdebug Installation Tutorials
Download Xdebug
First we need to download xdebug, be sure to choose the appropriate version of Xdebug according to the version of PHP installed, because I installed PHP in the Windows environment, so choose to download the Windows version of the Xdebug2.1.0 (5.3 VC6), Download down the Xdebug file for Php_xdebug-2.1.0-5.3-vc6.dll, this is because Xdebug is installed as a PHP module in the form of configuration and use.
xdebug Installation Tips : If you do not know the installed PHP version, you can see through the phpinfo () function, while Xdebug also provides Phpinfo output information analysis tool to help you analyze how to install Xdebug, Just copy and submit the Phpinfo output information, address: Xdebug phpinfo Information Analysis Address
Installing Xdebug
Copy the downloaded Php_xdebug-2.1.0-5.3-vc6.dll to the ext directory in the PHP installation directory, where the C:\php\ext,ext directory is dedicated to storing PHP extension library DLL files.
Modify the configuration of the php.ini
[Xdebug]
Zend_extension = D:/php-5.3/ext/php_xdebug-2.1.2-5.3-vc6.dll
Xdebug.auto_trace = On
Xdebug.show_exception_trace = On
Xdebug.remote_autostart = On
Xdebug.remote_enable = On
Xdebug.collect_vars = On
Xdebug.collect_return = On
Xdebug.collect_params = On
Xdebug.trace_output_dir= "D:/xdebuglog"
Xdebug.profiler_output_dir= "D:/xdebuglog"
Xdebug.profiler_enable=on
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Xdebug.remote_handler=dbgp
Fourth step: Launch Apache.
Fifth step: Find "PHP Debug" in the properties of Eclipse Project, select "XDebug" in PHP debugger
Sixth step: Again in the windows->preferences inside the configuration of PHP Servers
Seventh step: Again in the windows->preferences inside the configuration of PHP executables
Eighth step: Again in run->debug configurations inside Confirm path mapping configuration and sixth step in the same.
Next, entering the debug interface, you can start setting breakpoints for Debug.
Problems encountered in the configuration:
1, in Phpinfo (); The printed information has been unable to find the word xdebug.
Workaround: In the php.ini file, make the following modifications:
Zend_extension_ts = D:\php\ext\php_xdebug-2.2.3-5.3-vc9.dll
[Xdebug]
Xdebug.auto_trace = On
Modified to:
; zend_extension_ts = D:\php\ext\php_xdebug-2.2.3-5.3-vc9.dll
Extension = Php_xdebug-2.2.3-5.3-vc9.dll
[Xdebug]
Xdebug.auto_trace = On
2. Add a breakpoint in the code, but the breakpoint is invalid and cannot be stopped.
Workaround: In the php.ini file, make the following modifications:
; zend_extension_ts = D:\php\ext\php_xdebug-2.2.3-5.3-vc9.dll
Extension = Php_xdebug-2.2.3-5.3-vc9.dll
[Xdebug]
Xdebug.auto_trace = On
Modified to:
Zend_extension = D:\php\ext\php_xdebug-2.2.3-5.3-vc9.dll
; zend_extension_ts = D:\php\ext\php_xdebug-2.2.3-5.3-vc9.dll
; extension = Php_xdebug-2.2.3-5.3-vc9.dll
[Xdebug]
Xdebug.auto_trace = On
My PHP version is clearly the thread safe, but the use of zend_extension_ts here, but not very clear.
3, the breakpoint can only be effective in the first line, the latter still can not stop.
Workaround: Refer to the fifth step above, select Use Multisession, and refer to step eighth above to confirm the configuration of path mapping.