Using the debugger inside a devcontainer
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
Research direction
Start with the supplied launch.json and reproduce the breakpoint failure inside the devcontainer using the Firefox configuration. Compare its source-file handling with the working Edge configuration and verify that the resolved path opens in the container rather than on the host; done means Firefox debugging opens the corresponding source file.
Written by the indexing model from the issue text.
Description
Hi there,
I am trying to debug an issue inside my react app when using the Firefox browser. My app resides inside a devcontainer because my backend app is also residing there.
When I try to debug the issue and set a breakpoint the debugger stops apparently at the line. But the corresponding source file can't be open. This is kinda weird because when I use the Edge debugger extension for example everything is working fine. Also the path to file which can't be opened is valid inside the container. I checked that. The error message is:
The editor could not be opened because the file was not found.
This is my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch frontend (yarn)",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"cwd": "${workspaceFolder}/interface",
"runtimeArgs": ["start"],
"console": "integratedTerminal"
},
{
"type": "firefox",
"request": "launch",
"name": "Debug frontend in Firefox",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/interface/",
},
{
"type": "msedge",
"request": "launch",
"name": "Debug frontend in Edge",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/interface/",
}
]
}
I dug a little bit deeper and it seems that the debug extension is trying to open the file on my host environment which of course can't work because the layout is totally different. The Edge extension seem to open file inside the devcontainer just fine. Maybe the issue resides here?
Using vscode version: 1.83.1
Firefox extension version: v2.9.10
Firefox version: 118.0.2
Cheers
Daniel
- Dominant language
- TypeScript
- Stars
- 447
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firefox-devtools/vscode-firefox-debug
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
firefox-devtools/vscode-firefox-debug#391 · 2 comments · 1 reaction ·
-
bug path mapping
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Castle Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Create new issue Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
All issues in firefox-devtools/vscode-firefox-debug
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100