这篇文章将为大家详细讲解有关vscode PHP无法调试的解决方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
vscode PHP无法调试怎么办?vscode调试php的方法
xdebug调试vscode
下载xdebug.dll扩展库
php.ini配置
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
zend_extension="D:\phpstudy-2018\PHPTutorial\php\php-5.5.38\ext\php_xdebug.dll"
vscode 安装插件 php debug,php xdebug
add configuration:
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
调试时有两个选项:选择"Listen for XDebug"标示自己打开浏览器,输入网址-进入断点。
选择"Launch currently open script"标示调试当前文件。
关于“vscode PHP无法调试的解决方法”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。