PHPStorm configure XDebug Debug PHP code detailed tutorial
[PHP configuration]
Install xdebug for PHP. the method is omitted.
Configuration file php. ini
[XDebug]
Zend_extension = "C: \ xampp \ php \ ext \ php_xdebug.dll"
; Enable automatic tracking
Xdebug. auto_trace = On
; Enable exception tracking
Xdebug. show_exception_trace = On
; Enable automatic start of remote debugging
Xdebug. remote_autostart = On
; Enable remote debugging
Xdebug. remote_enable = 1
; Collect variables
Xdebug. collect_vars = On
; Collect return values
Xdebug. collect_return = On
; Collect parameters
Xdebug. collect_params = On
Xdebug. trace_output_dir = "C: \ xampp \ tmp"
Xdebug. profiler_append = 0
Xdebug. profiler_enable = 1
Xdebug. profiler_enable_trigger = 0
Xdebug. profiler_output_dir = "C: \ xampp \ tmp"
Xdebug. profiler_output_name = "cachegrind. out. % t-% s"
Xdebug. idekey = PhpStorm
Xdebug. remote_handler = "dbgp"
Xdebug. remote_host = "127.0.0.1"
Xdebug. remote_port = 9000
Phpstorm configuration]
File> Settings> ages & Frameworks> PHP> Servers
Add a Server.
File> Settings> Languages ages & Frameworks> PHP> Debug
On the XDebug tab, set port to 9000.
File> Settings> ages & Frameworks> PHP> Debug> DBGp Proxy
Set the IDE key to phpStorm, the host to localhost, and the port to 82.
Browser settings (Firefox and Google use another method)
Interconnect shards.
Run> Edit deployments
Add a Web Debugging server
Start listening
After a breakpoint is set in phpstorm, start the listener, which is the same as the phone number. When you use chrome to browse a file with a specified breakpoint in localhost, the file automatically enters the breakpoint and the debugging information is displayed in phpstorm.