Can not use env variables in the launch.json
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
- Domain
- devtools
Research direction
Start with the Firefox configuration in launch.json and reproduce the issue using the provided DEVSERVER_PORT environment variable. Compare its URL handling with the working Chrome configuration; done means the Firefox debugger resolves the variable and connects to the configured http://localhost port without hardcoding it.
Written by the indexing model from the issue text.
Description
Hello,
I am trying to make debugger configurations pointing to a port specified in the enviromental variables. It works for chrome and for edge but it does not with the firefox debugger.
"type": "firefox",
"request": "launch",
"name": "Debug React - Firefox",
"url": "http://localhost:${env:DEVSERVER_PORT}/",
"webRoot": "${workspaceFolder}/react_front/src",
"pathMappings": [
{
"url": "http://localhost:${env:DEVSERVER_PORT}/workspaces/project/react_front/src",
"path": "${workspaceFolder}/react_front/src"
}
]
with this configuration it tries to connect to https://localhost instead to http://localhost:3000 (for example), but if I hardcode the port instead it works just fine.
On the other side this configuration works for chrome
"type": "pwa-chrome",
"request": "launch",
"name": "Debug React - Chrome",
"url": "http://localhost:${env:DEVSERVER_PORT}",
"webRoot": "${workspaceFolder}/react_front/src",
So I don't know if this is a bug, or if there is any workaround to solve this problem. But the harcoded option is really bad because the other devs are going to set their ports and commit them, and CAOS.
Thank you.
- 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
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100