PHP debugging tool——XDebug use

WBOY
Release: 2016-07-29 08:58:06
Original
936 people have browsed it

The following uses the windows platform and Aptana Studio as examples to introduce the use of XDdebug.

1. Install XDebug

1) Download the XDebug extension .dll file of PHP. The official website download address is https://xdebug.org/download.php. You can download it according to the actual PHP operating system architecture, VC version and thread safety conditions. .

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

 ;Performance monitoring setting switch
 xdebug.profiler_enable = 1
 The directory where the performance monitoring information is written to the file

  xdebug.profiler_output_dir ="D:phpStudytmpxdebug"


 ;The output path of the set function call monitoring information

 xdebug.trace_output_dir="D:phpStudytmpxdebug"


 ;The generated performance monitoring file Name

  xdebug.profiler_output_name = "cache.out.%t-%s"


  ;These three lines are to allow the IDE to collaborate with XDebug

  127.0.0.1"


 ;The path to the .dll file
 zend_extension="D:phpStudyphp54nextphp_xdebug-2.4.0-5.4-vc9-nts.dll"

4) Restart the server


2. Use XDebug

1) Open aptana , window->preferences->php->debug, make the following settings:

2) window->preferences->php->php interpreters, make the following settings:

PHP debugging tool——XDebug use

name is the name of the parser, executable path is the path to the php.exe file in the PHP installation directory, and php.ini is optional. At this point, XDebug has been set up.

PHP debugging tool——XDebug use3) Use XDdebug

  to debug as F11 shortcut key.

 Step into is single-step execution. When encountering a sub-function, enter and continue single-step execution; (F5)

Step over is during single-step execution. When encountering a sub-function within a function, it will not enter the single-step within the sub-function. Execute, but execute the entire sub-function and then stop, that is, treat the entire sub-function as one step. (F6)

 Step return means that when you step into a sub-function, you can use step return to execute the rest of the sub-function and return to the previous function. (F7)

Now you can debug the php program with confidence.

The above introduces the use of XDebug, a PHP debugging tool, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template