【发布时间】:2021-07-02 11:23:55
【问题描述】:
在这个上转圈圈。
通过本地安装 xampp 设置,我可以让 PHP-DEBUG 在两种标准模式下正常工作:
- “监听 XDebug”和
- “启动当前打开的脚本”
尝试将其移至远程机器 - 特别是 Synology NAS。
在 VS Code 中,我可以通过标准 SMB 路径连接文件夹,例如:
//[nas]/web/[project]
在本地主机中,我映射到该站点,这是通过 Synology DiskStation 中的虚拟主机进行管理的,并且工作正常,例如
10.x.y.z dev.mysite.com
我正在尝试设置主机名、路径映射、xdebug.remote_host(设置为 NAS IP)、xdebug.idekey(VSCODE)、xdebug.remote_connect_back(ON)等建议的所有方式,但实际上没有得到任何结果——最近死了end 是一个错误:
message: 'listen EADDRNOTAVAIL: address not available 10.x.y.z:9001'
注意 - 使用端口 9001 来避免其他地方的冲突...
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",
"hostname": "dev.mysite.com",
"port": 9001,
"pathMappings": {
"/": "${workspaceFolder}"
},
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"hostname": "dev.mysite.com",
"port": 9001,
"pathMappings": {
"//[nas]/web/[project]": "${fileDirname}"
},
"log": true,
}
]
}
帮助.....
【问题讨论】:
标签: php visual-studio-code xdebug synology