这里讲解下 PHPstorm + phpstudy 开启 xdebug的详细步骤。
环境
phpstudy
php 7.4.3
phpstorm 2021.1
准备
2:修改 ini 配置文件
[Xdebug]
zend_extension=D:/phpstudy_pro/Extensions/php/php7.4.3nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=Off
xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.4.3nts.xdebug.trace
xdebug.profiler_enable=Off
xdebug.profiler_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.4.3nts.xdebug.profiler
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9100
xdebug.remote_handler=dbgp
3:phpstorm 修改配置
调试
访问你的域名并在最后加上参数 XDEBUG_SESSION_START=PHPSTORM
示例:
http://mcr.test.com/?page=3&XDEBUG_SESSION_START=PHPSTORM