Eclipse for Php+xdebug, building a PHP single-step debugging environment

Source: Internet
Author: User
Tags php server php debug
Environment

My environment is eclipse for Php+nginx+xdebug.

Tools

    • Eclipse for PHP
    • Xdebug

Specific steps

1. Installing Xdebug

    • Put the downloaded Xdebug file in the Ext directory of PHP.

    • Modify PHP.ini

Locate the php.ini in the PHP folder and add the following configuration information to the last side of the file:
"PS:"; " The statement at the beginning 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 with PHP. "Ps:php would have started if it were to be restarted because the configuration was modified. 】

2. Configure Eclipse

    • Open the project in Eclipse and find the "PHP Debug" configuration within the project's properties.


-PHP Server We choose to create a new one.

The last remaining path mapping can be changed.

Select Finish to see the modified PHP server.

OK, go back to the properties interface and select the newly created php-test.

ok,php Debug finished.

Finally, you need to configure Run->debug configurations.

All configurations Complete!

Finally, test it in Eclipse:

If no problem, eclipse will automatically enter debug mode.

PS: can also be accessed in the browser input URL, at this time if your eclipse is open, and php.ini Xdebug Open, configuration is not a problem will also enter the debug state of Eclipse.

All right, everyone, enjoy the fun of one-step debugging, ha ha ~ ~ ~

Reference article:
Eclipse for PHP + xdebug build PHP Debug 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); }); });

    The above describes the eclipse for Php+xdebug, set up a PHP single-step debugging environment, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • 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.