使用 Felix Becker 的 PHP Debug 1.11.1 在断点处停止时遇到问题
Having issue getting a stop on break points using PHP Debug 1.11.1 by Felix Becker
我正在尝试在 VS Code 中设置 PHP 调试。我似乎无法让听众做出回应。这是我的设置:
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
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,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Easy Peasy 就像说明中建议的那样...
我正在尝试在 VS Code 中设置 PHP 调试。我似乎无法让听众做出回应。这是我的设置:
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
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,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Easy Peasy 就像说明中建议的那样...