VSCode + Remote - 用于 Firefox 的 SSH + VS Code 调试器,如何?

Mogens TrasherDK

所以,我试图让vscode-firefox-debug发挥作用。

vscode-firefox-debug声称与 兼容vscode remote

我如何配置这个东西,与我的遥控器一起工作?

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

让我们称之为 box 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-debugXDebug.

添加到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}"
    },

又一次失败的尝试

帕特里克

按照链接帮助您:

https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug

在服务器上运行以手动启动 xdebug 的示例,同时通过 SSH 调试本地 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

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何为VS Code设置python调试器?

VS Code调试golang。Delve调试器

我到底如何使用Metals和VS Code调试器?

如何将VS Code的Python调试器附加到正在运行的进程?

VS Code Remote SSH:如何在断开连接后让进程保持运行至完成状态?

如何使用Chrome调试器通过VS Code中的代理调试Angular客户端应用程序

VS Code,更改调试器的NodeJS版本

VS Code Python 调试器不断启动 powershell

根据要求触发 VS Code python 调试器

如何激活Firefox调试器?

docker-compose用于将VS Code中的node.js调试器附加到WSL docker中的节点进程

如何删除 VS 代码调试器?

如何使用VSCode调试器调试Gunicorn工作进程?

使用VS Code在Python中进行REMOTE-SSH开发-挂在“启动Jupyter服务器”上

VSCode +调试器控制台。如何在调试器中更改文本的颜色?

Python远程调试器无法在VS Code中调试我的代码

TSLint '属性不存在于类型' VS firefox 调试器行为

vscode remote是否支持double ssh?

当没有Internet连接时,如何将扩展安装到VS Code服务器(即Remote-SSH的远程端)中?

如何更改VSCode的.Net Core 2调试器端口

一键启动VS Code的Live服务器和Chrome调试器

不带xdebug.remote_autostart = 1的VS Code PHP调试

如何更改Firefox调试器的字体大小

如何使用firefox调试器搜索HTML DOM?

VS Code Remote-带有空格的Windows路径-ssh错误

带有Vue.js的VS Code中Chrome的调试器设置

VS Code Python 调试器不会连接到正在运行的进程(超时)

VS Code Java调试器可释放某些代码行

在Chrome和VS Code中,断点在调试器中都不行