Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vscode debug launch config for attachment to Firefox (requires Firefox plugin installation in vscode) #10

Open
wants to merge 3 commits into
base: websocket-kjm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
"pathMapping": {
"/.metadata/.plugins/com.sifive.freedomstudio.util/pvapp/1.0/": "${workspaceFolder}",
}
},
{
"type": "firefox",
"request": "attach",
"name": "Local Firefox Attach",
"port": 6000,
"pathMappings": [
{
"url": "http://*/.metadata/.plugins/com.sifive.freedomstudio.util/pvapp/1.0/lib",
"path": "${workspaceFolder}/lib"
}
]
}
]
}
12 changes: 12 additions & 0 deletions readme/vscode-dev-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ You are on your own here. You can set breakpoints, look at variables, etc...

If you make any code modifications, you will need to invoke the build/install/debug loop to run the new code.

### Firefox

Although we currently emphasize Chrome support, it might be occasionally useful to debug an environment that uses Firefox as its default web browser.

If that eventuality arists, then to set that up, install the Firefox debug extension to vccode (https://marketplace.visualstudio.com/items?itemName=firefox-devtools.vscode-firefox-debug).

Open a terminal and start firefox using this command:

`firefox --start-debugger-server`

Then from vscode, use the launch configuration named "Local Firefox Attach"

## Helpful Links

- https://stackoverflow.com/questions/65200278/vscode-settings-how-to-get-a-hostname-when-using-remote-ssh