question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for Remote - SSH

See original GitHub issue

Firstly I want to thank you for your efforts so far!

As I’m sure you’re aware, Microsoft have added support to VS Code for remote development on containers, by SSH, and through WSL. I’m particularly interested in the SSH solution.

https://code.visualstudio.com/docs/remote/ssh

Unfortunately I can’t get the Firefox Debug addon to work with this setup. Here’s what I’ve tried:

  • Mapped port 5001 (Angular web app port) local to remote when connecting by SSH
  • Install addon both remotely and locally (it defaults to remote but can be forced to local - I’m not sure which is correct but my guess is it should be local)

The browser never launches with any of these combinations, although I can see the debug adapter spinning up locally when installed on local, and remotely when installed on remote. Here is my launch.json entry:

{
    "name": "Attach to Firefox",
    "type": "firefox",
    "request": "launch",
    "reAttach": true,
    "url": "https://127.0.0.1:5001/",
    "webRoot": "${workspaceFolder}/App/ClientApp/dist/",
    "profileDir": "${workspaceFolder}/.vscode/firefox_debug_profile",
    "keepProfileChanges": true,
    "skipFiles": [
        "${workspaceFolder}/App/ClientApp/node_modules/**",
        "${workspaceFolder}/App/ClientApp/dist/**",
        "http?(s):/**"
    ],
    "pathMappings": [
        {
            "url": "webpack:///",
            "path": "${workspaceFolder}/App/ClientApp/"
        },
        {
            "url": "ng:///",
            "path": "${workspaceFolder}/App/ClientApp/src/"
        }
    ],
    "showConsoleCallLocation": true
}

I have also tried Attach mode with addon installed locally; VS Code connects, but breakpoints don’t hit.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hbenlcommented, May 9, 2019

I can’t reproduce the problem with launching Firefox, but I see that breakpoints don’t work and it looks like this can’t be fixed by configuration alone, I’ll have to add support for remote workspaces to this extension.

0reactions
jonfencommented, Oct 31, 2019

Version 2.2.0 of the debug adapter supports remote development. Please try it out and tell me if it works for you.

@hbenl I can set and hit a breakpoint in vscode in a JS file, this shows in the vscode debugging toolbar, as well as the firefox debugger, while I can Step Over or Step In using either the vscode debugging toolbar or the firefox debugger – I can only see where what line the cursor is on in the firefox debugger – I can’t see what line the cursor is on in the vscode JS file.

The vscode instance is running in a .devcontainer, while the firefox browser (firefox -start-debugger-server -dev-tools) is running on the host (my laptop).

{
            // https://github.com/firefox-devtools/vscode-firefox-debug
            // Before attaching, start Firefox from a host terminal using the following:
            // firefox -start-debugger-server -dev-tools
            "name": "Firefox: attach localhost:5000",
            "type": "firefox",
            "request": "attach",
            "url": "http://localhost:5000",
            "webRoot": "${workspaceFolder}/application"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote Development using SSH - Visual Studio Code
Start by selecting Remote-SSH: Add New SSH Host... from the Command Palette (F1, Ctrl+Shift+P) or clicking on the Add New icon in the...
Read more >
How to access remote systems using SSH | Enable Sysadmin
To initiate an SSH connection to a remote system, you need the Internet Protocol (IP) address or hostname of the remote server and...
Read more >
How To Use SSH to Connect to a Remote Server | DigitalOcean
To connect to a remote system using SSH, we'll use the ssh command. If you are using Windows, you'll need to install a...
Read more >
Using an SSH Connection to Provide Remote Support (Part I)
Using an SSH Connection to Provide Remote Support (Part I) · Install OpenSSH Client & Server · Add 'reverse.key.pub' from above to an...
Read more >
A beginner's guide to SSH for remote connection on Linux
Start a secure shell ... Now that you've installed and enabled SSH on the remote computer, you can try logging in with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found