之前一直没有配置成功phpstorm+xdebug远程调试
还是要多多熟悉一下phpstorm,虽然vs code也是很不错的调试工具,但是用phpstorm可以看的更清晰一点
由于要php7的环境,于是phpstudy切换到php7

然后将phpinfo导出

去xdebug官网https://xdebug.org/wizard.php
将phpinfo信息粘贴,然后按步骤来

由于要在phpstorm中调试
最后的配置文件如下:
[XDebug]
xdebug.profiler_output_dir="E:\ProgramFiles\phpstudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="E:\ProgramFiles\phpstudy\PHPTutorial\tmp\xdebug"
zend_extension=E:\ProgramFiles\phpstudy\PHPTutorial\php\php-7.1.13-nts\ext\php_xdebug-2.7.2-7.1-vc14-nts.dll
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
chrome安装插件

然后刷新一下页面就成了

网友评论