Phpstorm debug setting

xdebug official websit

windows download dll base on localhost/phpinfo.php:
https://xdebug.org/download.php
linux download:
https://xdebug.org/wizard.php

php.ini edit

add xdebug setting at the end of php.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[xdebug]
zend_extension = "D:/phpStudy/php56n/php_xdebug-2.2.7-5.6-vc11-nts-x86_64.dll"

xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="D:/phpStudy/php56n/tmp"
xdebug.show_local_vars=0

xdebug.var_display_max_children=128
xdebug.var_display_max_data=512
xdebug.var_display_max_depth=5

xdebug.idekey=PhpStorm
xdebug.remote_enable = On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

checkout xdebug model is available php -m php -i

Browser setting

chrome install xdebug helper
firefox install theeasiestxdebug

IDE key set to the same as property in php.ini

phpstorm setting

php CLI interpreter setting:
20181223185642.png

set debug listen server ip or domain
20181223185503.png

set DBGp key/port [same as property in php.ini]
20181223185452.png

build a local php debug server [skip if a remote server exists]
20181223185714.png

add a server listener deal with debug session in php
20181223185724.png

fundamentals

20181223194910.png

https://www.cnblogs.com/anyeshe/p/5746404.html

https://www.cnblogs.com/dongruiha/p/6739838.html