一,
查找合適的版本:https://xdebug.org/wizard
安裝xdebug擴(kuò)展并且配置php.ini
zend_extension = D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext\php_xdebug-2.9.6-7.3-vc15-nts-x86_64.dll
xdebug.idekey = PHPSTORM
xdebug.remote_enable=1
xdebug.remote_host=china-made-admin-backend.com
xdebug.remote_port=9100
xdebug.collect_return=1
xdebug.show_mem_delta=1
xdebug.collect_params=4
xdebug.profiler_enable_trigger = 1
xdebug.profiler_enable_trigger_value=SINA_SCP
xdebug.trace_enable_trigger = 1
xdebug.trace_enable_trigger_value=SINA_SCP
二,phpStorm配置
2.1 端口號(hào)和php.ini配置的端口號(hào)一致即可。

image.png
2.2 IDE key和xdebug.idekey一致,host當(dāng)前項(xiàng)目的域名

image.png
3.3 配置servers ,host當(dāng)前項(xiàng)目的域名 同上。Debugger 選擇 Xdebug

image.png
三,PostMan配置
在對(duì)應(yīng)的域名(china-made-admin-backend.com)下設(shè)置cookie XDEBUG_SESSION是調(diào)試的時(shí)候必須傳的參數(shù):XDEBUG_SESSION=PHPSTORM,cookie里就會(huì)默認(rèn)帶上該參數(shù)

image.png
四,PostMan發(fā)起請(qǐng)求,然后再項(xiàng)目里打斷點(diǎn),這時(shí)phpstorm 就會(huì)有斷點(diǎn)信息輸出。

image.png

image.png