Eclipseforphp + Xdebug to build a single-step php debugging environment

Source: Internet
Author: User
: 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

  • Eclipse for php
  • Xdebug

Procedure

1. install Xdebug

  • Put the downloaded xdebug file in the php ext directory.

  • Modify php. ini

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.

    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.