firefox-devtools / firefox-devtools/vscode-firefox-debug

Can not use env variables in the launch.json

Aperta
#264 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
447
Fork
76
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla configurazione di Firefox in launch.json e riproduci il problema usando la variabile d'ambiente DEVSERVER_PORT fornita. Confronta la gestione dell'URL con quella della configurazione funzionante di Chrome; il lavoro è completato quando il debugger di Firefox risolve la variabile e si connette alla porta http://localhost configurata senza codificarla direttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.