这里我 PHP 版本使用的是 5.6.27
PHP 扩展及设置 ->PHP 扩展 ->Xdebug 打勾
然后修改 PHP.INI
- xdebug.profiler_output_dir="E:\phpstudy\PHPTutorial\tmp\xdebug"
- xdebug.trace_output_dir="E:\phpstudy\PHPTutorial\tmp\xdebug"
zend_extension="D:\phpStudy1\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll" ; 这里写你自己的路径
- xdebug.remote_enable=1
- xdebug.remote_handler=dbgp
- xdebug.remote_mode=req
- xdebug.remote_port=9000
- xdebug.idekey="PHPSTORM"
然后 phpstorm 配置
IDE key 填 PHP.INI 里面设置的
添加个服务器
然后浏览器安装 Xdebug helper, 进去设置
在 phpstorm 里面下断点, 并开启监听
浏览器访问一下, 断点便断下来了
来源: http://www.bubuko.com/infodetail-3719230.html