Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VSCode+;远程-SSH+;VS Firefox代码调试器,如何?_Firefox_Visual Studio Code_Remote Debugging_Vscode Debugger_Vscode Remote - Fatal编程技术网

VSCode+;远程-SSH+;VS Firefox代码调试器,如何?

VSCode+;远程-SSH+;VS Firefox代码调试器,如何?,firefox,visual-studio-code,remote-debugging,vscode-debugger,vscode-remote,Firefox,Visual Studio Code,Remote Debugging,Vscode Debugger,Vscode Remote,所以,我想让孩子们玩 它声称与vscode-remote兼容,名为vscode-firefox-debug 如何配置此设备以使用遥控器? 我所有的开发都是在远程无头服务器上完成的,运行Slackware64 14.2 让我们把这个盒子叫做www.example.com 我的本地框是一个Windows 8.1 x64 Pro,带有: Firefox 69.0.1(64位) 我使用“C:\Program Files\Mozilla firefox\firefox.exe”-启动调试器服务器运行fir

所以,我想让孩子们玩

它声称与
vscode-remote
兼容,名为
vscode-firefox-debug

如何配置此设备以使用遥控器?

我所有的开发都是在远程无头服务器上完成的,运行Slackware64 14.2

让我们把这个盒子叫做
www.example.com

我的本地框是一个
Windows 8.1 x64 Pro
,带有:

Firefox 69.0.1(64位)

我使用“C:\Program Files\Mozilla firefox\firefox.exe”-启动调试器服务器运行firefox

我已经有了
远程SSH
和friends设置,并且可以很好地使用和
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}"
    },
    {
      "name": "Attach index.html",
      "type": "firefox",
      "request": "attach",
      "port": 6000,
      "url": "https://www.example.com/",
      "webRoot": "${workspaceFolder}"
    },

第二次尝试

    {
      "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}"
    },
    {
      "name": "Attach index.html",
      "type": "firefox",
      "request": "attach",
      "port": 6000,
      "url": "https://www.example.com/",
      "webRoot": "${workspaceFolder}"
    },

第三次尝试

    {
      "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}"
    },
    {
      "name": "Attach index.html",
      "type": "firefox",
      "request": "attach",
      "port": 6000,
      "url": "https://www.example.com/",
      "webRoot": "${workspaceFolder}"
    },
我在调试控制台中得到一个通知,说:

Firefox can't open a file in a remote workspace
最后一次尝试

    {
      "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}"
    },
    {
      "name": "Attach index.html",
      "type": "firefox",
      "request": "attach",
      "port": 6000,
      "url": "https://www.example.com/",
      "webRoot": "${workspaceFolder}"
    },

请点击链接以帮助您:

在服务器上运行以在通过SSH调试时手动启动xdebug的示例本地VS代码IDE上的文件为:

$ php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_connect_back=1 /var/www/html/teste.php