Eclipse for PHP + xdebug build PHP Debugging Environment ____php

Source: Internet
Author: User
Tags php debug php debugger vc9

Eclipse for PHP + xdebug build PHP Debugging Environment

First step: Go to Eclipse's website to download PHP-ECLIPSE:HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-PHP-DEVELOPERS/HELIOSSR1

Step two: Download xdebug (download address is: http://xdebug.org/download.php, my PHP version is php 5.3.28 Thread Safety, Apach is 2.2.25, use the port number 8080), The Xdebug version I downloaded is php_xdebug-2.2.3-5.3-vc9.dll and placed in the Php/ext directory.

Step three: Find the php.ini in the PHP5 and add the following configuration information at the end of the file:

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

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

Pay special attention here: if there are other zend_extension_ts in the file, you need to comment out, otherwise Apache will not be able to start.

Fourth step: Start Apache.

Step Fifth: Find "PHP Debug" in the properties of Eclipse's project, choose "XDebug" in PHP debugger

Sixth step: Again in windows->preferences inside the configuration of PHP Servers

Seventh step: Again in windows->preferences inside the configuration of PHP executables

Step eighth: Then confirm the path mapping configuration in the Run->debug configurations and the same in step sixth.

Next, you go to the debug interface and you can start setting breakpoints to debug.

Problems encountered in configuration:

1, in Phpinfo (), the printed information has been unable to find the words xdebug.

Solution: 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, cannot stop.

Solution: 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 thread safe, but the use of zend_extension_ts here, but not, I do not understand.

3, the breakpoint can only be effective in the first line, the back of the still can not stop.

Workaround: Refer to step fifth above, select Use Multisession, and refer to step eighth to confirm the configuration of path mapping.

Related Article

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.