PhpStorm配置Xdebug最完整最详解教程,100%成功!
https://blog.csdn.net/qq_34087545/article/details/89490269?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
配置过程:
- PHP Study 开启 xdebug 扩展
- 设置应用端口和服务地址
- 设置监听端口号
端口号要和php.ini中xdebug的端口号一致
- 确认 php.ini 中xdebug端口
[Xdebug]
zend_extension=D:/phpstudy_pro/Extensions/php/php5.6.9nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=On
xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php5.6.9nts.xdebug.trace
xdebug.profiler_enable=On
xdebug.profiler_output_dir ="D:phpstudy_proExtensionstmpxdebug"
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9100
xdebug.remote_handler=dbgp
- 如果还是不起作用 phpinfo() 一下信息,确认配置信息和显示信息是否一致。
- 如果都做了还是不行,在 phpinfo() 处设置断点,单独执行如何可以,应该就没有问题了,感觉有时间没有监听到,一旦监听第一次就好用了。
- 如果不能自定监听,请确认监听是否打开,是否debug调试中;
圈1:启动debug;圈2:监听打开中;圈3:debug中;
如果不起作用,可以点击圈1位置,启动调试,启动成功,会变为圈3状态;