杰客网络

杰客网络个人博客

PhpStorm配置Xdebug

默认分类 0 评

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

配置过程:

  1. PHP Study 开启 xdebug 扩展

请输入图片描述

  1. 设置应用端口和服务地址

请输入图片描述

  1. 设置监听端口号

端口号要和php.ini中xdebug的端口号一致
请输入图片描述

  1. 确认 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

  1. 如果还是不起作用 phpinfo() 一下信息,确认配置信息和显示信息是否一致。
  2. 如果都做了还是不行,在 phpinfo() 处设置断点,单独执行如何可以,应该就没有问题了,感觉有时间没有监听到,一旦监听第一次就好用了。
  3. 如果不能自定监听,请确认监听是否打开,是否debug调试中;

2022-07-30T05:46:16.png

圈1:启动debug;圈2:监听打开中;圈3:debug中;
如果不起作用,可以点击圈1位置,启动调试,启动成功,会变为圈3状态;

Linux 学习