所以,我试图让vscode-firefox-debug发挥作用。
它,vscode-firefox-debug
,声称与 兼容vscode remote
。
我如何配置这个东西,以使用我的遥控器?
我所有的开发都是在远程无头服务器上完成的,运行 Slackware64 14.2
我们叫那个盒子www.example.com
。
我的本地盒子是Windows 8.1 x64 Pro
:
Firefox 69.0.1 (64-bit)
Visual Studio Code
Version: 1.38.1 (system setup)
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:35:15.005Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 6.3.9600
我运行 Firefox"C:\Program Files\Mozilla Firefox\firefox.exe" -start-debugger-server
我已经Remote-SSH
设置了和朋友,并且与vscode-php-debug和XDebug
.
添加到launch.json
远程服务器上。我尝试了一些变体:
第一次尝试
{
"name": "Launch localhost",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost/index.html",
"webRoot": "${workspaceFolder}"
},
第二次尝试
{
"name": "Attach localhost",
"type": "firefox",
"request": "attach",
"url": "http://localhost/index.html",
"webRoot": "${workspaceFolder}"
},
第三次尝试
{
"name": "Launch index.html",
"type": "firefox",
"request": "launch",
"reAttach": true,
"port": 6000,
"file": "${workspaceFolder}/index.html",
"url": "https://www.example.com/index.html",
"webRoot": "${workspaceFolder}"
},
我在调试控制台中收到通知,说:
Firefox can't open a file in a remote workspace
最后一次尝试
{
"name": "Attach index.html",
"type": "firefox",
"request": "attach",
"port": 6000,
"url": "https://www.example.com/",
"webRoot": "${workspaceFolder}"
},