phpstorm中使用xdebug调试配置-折腾笔记

由于以前写的PHP程序比较少,所以很少使用专门工具进行debug,都在使用die(var_dump())等作死手段,随着改革开放与两学一做的创新,我也用一下专业的debug工具。

一、环境

部署:phpstudy

PHP版本: 5.6.27

Apache端口:9090

二、在php.ini中启用xdebug插件

添加内容如下:

[XDebug]
xdebug.profiler_output_dir="D:\phpStudy20161103\tmp\xdebug"
xdebug.trace_output_dir="D:\phpStudy20161103\tmp\xdebug"
zend_extension="D:\phpStudy20161103\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.remote_enable = 1  
xdebug.remote_port=9000

制定debug端口为9000

二、在PHPstorm中启用xdebug

1、File=>Setting

修改xdebug端口为php.ini中指定xdebug端口。

2、IDE右上角 Edit Run/Debug Configations

点击+进行添加,名称填写为lavavel,添加服务器如下图:

 

三、快快xdebug吧

参考链接


https://segmentfault.com/q/1010000007604779