zl程序教程

您现在的位置是:首页 >  其他

当前栏目

phpstorm断点配置xdebuger

2023-04-18 14:50:50 时间

配置php断点调试

  1. 找到php.ini配置文件

文件路径 :E:wamp64inapacheapache2.4.23in

找到xdebuger的配置信息位置。

添加配置信息

添加配置信息后重启服务器。

进入Localhost查看配置信息。

进入phpinfo。

能看到配置信息表示添加成功。

  1. Phpstorm配置

配置调试服务器。

确认端口为9000

  1. 安装xdebuger

Chrome –> 更多工具 –> 扩展程序。

添加完成

  1. 测试断点

注意:这种调试方式,是被动式的调试方式,需要触发!

有请求的时候,来触发脚本。

先给后台文件打一个断点

打开电话监听。

点绿的小虫子!

Debugger

提交文件触发响应!

这样就可以查看后台运行情况。

调试工具

断点调试效果

xdebug.txt

; XDEBUG Extension 

zend_extension = "e:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll" ; 

[xdebug] 
xdebug.remote_enable = off 
xdebug.profiler_enable = off 
xdebug.profiler_enable_trigger = off 
xdebug.profiler_output_name = cachegrind.out.%t.%p 
xdebug.profiler_output_dir = "e:/wamp/tmp" 
xdebug.show_local_vars=0 
xdebug.idekey=PhpStorm 
xdebug.remote_enable = On 
xdebug.remote_host=localhost 
xdebug.remote_port=9000 
xdebug.remote_handler=dbgp
复制代码