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
;The output path of the set function call monitoring information
;The generated performance monitoring file Name
;These three lines are to allow the IDE to collaborate with XDebug
;The path to the .dll file
zend_extension="D:phpStudyphp54nextphp_xdebug-2.4.0-5.4-vc9-nts.dll"
2. Use XDebug
1) Open aptana , window->preferences->php->debug, make the following settings:
2) window->preferences->php->php interpreters, make the following settings: 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.3) 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.