phpstorm xdebug use for debugging (c)

1, by a detection means provided in the official xdebug: https://xdebug.org/wizard.php , find the corresponding version xdebug document, as shown below:

 

 

2, install and configure xdebug:

(1) will be downloaded .dll files in the specified location (.. \ PHP7.3.16 \ ext).

(2) php.ini configuration file, add the following to the end of the file:

; Configure Xdebug 
[Xdebug] 
zend_extension = "D: /DevelopTools/PhpEnv/PHP7.3.16/ext/php_xdebug-2.9.4-7.3-vc15-x86_64.dll" 
; turn on remote debugging 
xdebug.remote_enable = the On 
; enable performance testing analysis 
= the On xdebug.profiler_enable 
; activation code automatically track 
xdebug.auto_trace = the On 
xdebug.profiler_enable_trigger = the On 
xdebug.profiler_output_name cachegrind.out% T% P =.. 
; storage directory file specified profiling 
xdebug.profiler_output_dir = "D: / DevelopTools /PhpEnv/PHP7.3.16/tmp " 
xdebug.show_local_vars = 0 
; xdebug client listening port and debug protocol 
xdebug.remote_handler = dbgp 
xdebug.remote_port = 9000 
; client ip 
xdebug.remote_host =" localhost "

Once configured, you can restart your environment, and then print out the phpinfo () information will be able to see xdebug information in the page:

3, configuration phpstorm:

(1) FIle -> Settings -> PHP Servers are provided, as shown below:

FIG above, host configured to just set php profile xdebug.remote_host = "localhost" corresponding parameters, use port 8081, debugger can select xdebug.

(2) Debug is provided, as shown below:

4, xdebug in phpstorm for debugging:

(1) add a run / debug settings:

 

(2) debugging:

So far, the use of xdebug in phpstorm for debugging is complete.

 

 

reference:

https://www.cnblogs.com/zengguowang/p/8391227.html

Guess you like

Origin www.cnblogs.com/d0usr/p/12622352.html