PHP-XDebug安装 详解
参考网址:
1:https://www.cnblogs.com/zjfblog/p/7055100.html
2:https://baijiahao.baidu.com/s?id=1607680791440431678&wfr=spider&for=pc
3:https://blog.****.net/qq_35770969/article/details/80757959
4:https://xdebug.org/wizard.php (php版本检测)
一、安装
先看完参考网址资料,具体安装可以按第四个参考网址来操作都有详细的步骤,这里不做过多的描述和讲解。
二、我踩过的坑
1:注意版本号,32位还是64位(在phpinfo中有)如下图
2:确保自己开启了 xdebug 扩展(如同 php_gd2、php_curl、php_pdo 这种)
3:下载好的php_xdebug文件名,在配置php.ini中一定要一至(我是单独下载的导致文件名有些不同)
三、配置 php.ini
[XDebug]
xdebug.profiler_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
zend_extension="D:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext\php_xdebug-2.7.0-7.0-vc14-nts.dll"
;是否开启远程调试
xdebug.remote_enable=1
xdebug.remote_autostart = 1
;调试插件dbgp
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
;允许调试的客户端IP
xdebug.remote_host=localhost
;远程调试的端口(默认9000)
xdebug.remote_port=9000
xdebug.idekey="PHPSTORM"