问题得到停止使用PHP调试1.11.1由Felix Becker停止点
问题描述:
我想在VS代码中设置PHP调试。我似乎无法让听众回应。这里是我的设置:问题得到停止使用PHP调试1.11.1由Felix Becker停止点
的php.ini:
[XDebug]
xdebug.remote.enable=1
xdebug.remote.autostart=1
zend_extension="C:\xampp\php\ext\php_xdebug-2.5.4-5.5-vc11.dll"
的httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html/winemakerssoftware.com"
ServerName wms.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html/dianestevenslaw.com"
ServerName law.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html"
ServerName rwd.localhost
</VirtualHost>
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"serverSourceRoot": "E:/gator4123/public_html",
"localSourceRoot": "${workspaceRoot}/",
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
我的物理根位置:
E:\gator4123\public_html
我已经尝试了这两个URL并得到相同的回应,死气沉沉。当我开始调试时,连接实现消息后没有输出。
启动响应:<- launchResponse Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }
http://localhost
http://rwd.localhost
有什么我错过了什么?
答
好吧,不是最复杂的答案,但我确实得到它的工作。
首先是XAMPP升级到最新版本,其中包括PHP 7.1.1
下一页是重新安装了XDebug与库相匹配的PHP 7.1.1
最后这里是我的新文件设置
的php.ini:
[XDebug] zend_extension = C:\xampp\php\ext\php_xdebug-2.5.4-7.1-vc14.dll xdebug.remote_enable = 1 xdebug.remote_autostart = 1
HT TPD-vhosts.conf
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html/winemakerssoftware.com"
ServerName wms.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html/dianestevenslaw.com"
ServerName law.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/gator4123/public_html"
ServerName rwd.localhost
</VirtualHost>
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
易peasy就像说明建议...