: This article mainly introduces Eclipseforphp + Xdebug to build a single-step php debugging environment. For more information about PHP tutorials, see. Environment
My environment is Eclipse for php + nginx + xdebug.
Tools
Procedure
1. install Xdebug
- Put the downloaded xdebug file in the php ext directory.
Find PHP. ini in the php folder and add the following configuration information at the end of the file:
The statement starting with ";" is a comment statement. My xdebug version is php_xdebug-2.4.0rc3-5.6-vc11.dll]
zend_extension = F:\DevEnv\PHP\ext\php_xdebug-2.4.0rc3-5.6-vc11.dll;zend_extension_ts = F:\DevEnv\PHP\ext\php_xdebug-2.4.0rc3-5.6-vc11.dll;extension = php_xdebug-2.4.0rc3-5.6-vc11.dll[Xdebug]xdebug.auto_trace = Onxdebug.show_exception_trace = Onxdebug.remote_autostart = Onxdebug.remote_enable = Onxdebug.collect_vars = Onxdebug.collect_return = Onxdebug.collect_params = Onxdebug.trace_output_dir=”D:/xDebugLog”xdebug.profiler_output_dir=”D:/xDebugLog”xdebug.profiler_enable=Onxdebug.remote_host=localhostxdebug.remote_port=9000xdebug.remote_handler=dbgp
- After modification, start nginx and php. [PS: If php is already started, restart it because the configuration has been modified .]
2. configure Eclipse
- Open the project in Eclipse and find "PHP Debug" in the project Properties for configuration.
-Create a PHP Server.
You can leave the remaining Path Mapping unchanged.
Select Finish to view the modified php server.
OK. return to the Properties page and select the newly created php-test.
OK. php debug has been modified.
Finally, configure Run-> Debug Configurations.
All configurations are complete!
Finally, test in Eclipse:
If there is no problem, Eclipse automatically enters the debug mode.
PS: You can also enter a URL in your browser to access the website. if your eclipse is open and php. if the xdebug of ini is enabled and the configuration is okay, it will also enter the debug Status of eclipse.
Now, you can enjoy the single-step debugging ~~~
References:
Eclipse for php + Xdebug build a PHP debugging environment
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces Eclipse for php + Xdebug, and builds a single-step php debugging environment, including some content, and hopes to help friends who are interested in PHP tutorials.