phpstorm+xdebug配置PHP断点调试

环境:win10+phpstudy。nginx+php5.6+phpstorm2016

安装下载略,phpstudy里都带了。

  • 配置php.ini
[XDebug]
zend_extension="D:\phpstudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll"

xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "D:\phpstudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="D:\phpstudy\PHPTutorial\tmp\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
;xdebug.remote_autostart=on
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = "req"
;xdebug.remote_host = "127.0.0.1"
xdebug.remote_port=9100
;xdebug.show_local_vars=0
xdebug.idekey= PHPSTORM

注意:remote_host可以不配,会默认为localhost。路径使用window的分隔符。9000端口会被php-cgi占用,改为9100.

[zend]项里的zend_extension项的相对有问题,改为绝对路径。

  • 重启,看phpinfo.有下图这些就OK了。


  • 配置phpstorm。
    端口与php.ini里的相一致。


    DGBp,因为在本地。按图配置即可。


    servers里,要配置网站访问的域名,端口一般是80。
    这一步,如果在本地配置了hosts,搞了很多虚拟机,要特别注意理解一下。


    在Edit Configurations里增加调试的站点。项目类型选php web application。填入自己刚才设置好的server即可。



    到这儿,就配置完毕了,如果你的网站之前是可以正常访问的,那么在shift+f9时,即可以跳转到chrome打开设置的域名。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值