Php debugging tool-XDebug use, php debugging tool xdebug_PHP tutorial

Source: Internet
Author: User
Use php debugging tool-XDebug and php debugging tool xdebug. Use php debugging tool-XDebug. use windows platform and AptanaStudio as an example to introduce the use of XDdebug. 1. install XDebug1) Download php XDebug extension. dll file php debugging tool-use XDebug, php debugging tool xdebug

The following uses windows platform and Aptana Studio as an example to describe how to use XDdebug.

1. install XDebug

1) Download the XDebug extension. dll file of php. the official website is https://xdebug.org/download.php. you can use Phpto run the system, and download vCPUs and thread security information.

2) copy the downloaded. dll file to the ext Directory of the php installation directory.

3) open the php. ini file and add the following settings:
Xdebug. profiler_append = 0

Setting and switching of performance monitoring
Xdebug. profiler_enable = 1
Xdebug. profiler_enable_trigger = 0

When profiler_enable is set to 1, performance monitoring information is written to the directory where the file is located
Xdebug. profiler_output_dir = "D: \ phpStudy \ tmp \ xdebug"

The output path of the function call monitoring information.
Xdebug. trace_output_dir = "D: \ phpStudy \ tmp \ xdebug"

; Name of the generated Performance Monitoring File
Xdebug. profiler_output_name = "cache. out. % t-% s"

These three lines are used for collaboration between IDE and XDebug.
Xdebug. remote_enable = 1
Xdebug. remote_handler = "dbgp"
Xdebug. remote_host = "127.0.0.1"

;. Dll file path
Zend_extension = "D: \ phpStudy \ php54n \ ext \ php_xdebug-2.4.0-5.4-vc9-nts.dll"

4) restart the server

2. use XDebug

1) open aptana, window-> preferences-> php-> debug and perform the following settings:

2) set window> preferences> php interpreters as follows:

Name is the name of the parser, executable Pathis the php.exe file path in the php installation directory, and php. ini is optional. Now, XDebug has been set.

3) use XDdebug

Debug as F11 shortcut.

Step into is a single-step execution. when a sub-function is encountered, it enters and continues the single-step execution. (F5)
Step over is a single-step execution. when a sub-function is encountered in a function, the sub-function is not executed in a single step. Instead, the sub-function is stopped after execution, that is to say, take the sub-function as a step. (F6)
Step return is used to execute the remaining part of the sub-function and return the number of functions in the previous layer. (F7)

Now you can debug the php program with confidence.

The following uses windows platform and Aptana Studio as an example to describe how to use XDdebug. 1. install XDebug 1) Download the XDebug extension. dll file of php...

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.