phpstorm设置断点过程

1.为php安装xdebug,方法在上一篇中有详细介绍

2.注意这个时候需要修改php.ini内容如下:

[Xdebug]
zend_extension_ts ="d:/wamp/php/ext/php_xdebug-2.1.2-5.2-vc6.dll"
xdebug.auto_trace=On
xdebug.collect_params=On
xdebug.collect_return=On
xdebug.trace_output_dir="d:/wamp/php/debuginfo"
xdebug.profiler_enable=On
xdebug.profiler_output_dir="d:/wamp/php/debuginfo"
xdebug.idekey=PhpStorm
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

3.phpstorm配置

  • 客户端调试,打开phpStorm,进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,port填80,debugger选XDebug
  • 进入File>Settings>PHP>Debug,看到XDebug选项卡,port填9000,其他默认
  • 进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 phpStorm,host 填localhost,port 填80
  • 点OK退出设置。

4.浏览器设置
   chrome有插件xdebug helper下载后,设置白名单为localhost也就是默认localhost,才显示小虫子的图标

5.启动断点:

   在phpstorm中设置断点后,启动监听,就是电话一样的图标,然后用chrome浏览localhost中的指定断点的文件,会自动进入断点,在phpstorm中看到调试信息。

具体的细节还在学习中。

原文地址:https://www.cnblogs.com/tippoint/p/3429384.html