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

Breakpoints do not bind when debugging localhost url using WSL

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

Descrizione

I have a typescript webpack project running on WSL serving on the following addresses:

```
[webpack-dev-server] Project is running at:
[webpack-dev-server] Loopback: http://localhost:8080/
[webpack-dev-server] On Your Network (IPv4): http://172.23.198.163:8080/
```

I can access both addresses, but debug breakpoints will not bind when accessing the page through the `localhost` url. When I restart the debug session using the network url, the breakpoints do bind. This is an issue not only for network access reasons, but because certain web APIs cannot be accessed in insecure contexts (e.g. `crypto.subtle`)

This is only an issue when serving from WSL. When running the project from a normal windows environment both urls work fine.

The Chrome debugger does not have this issue with WSL.

This issue is only with breakpoints in vscode. The browser debugger works fine. Source maps are being loaded.

```
{
"configurations": [
{
"type": "firefox",
"request": "launch",
"name": "firefox",
"url": "http://localhost:8080",
// "url": "http://172.23.198.163:8080",
"webRoot": "${workspaceFolder}",
"skipFiles": [
"/**",
"**/node_modules/**"
],
"pathMappings": [
{
"url": "webpack:///src",
"path": "${workspaceFolder}/src"
}
]
},
{
"name": "chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"skipFiles": [
"/**",
"**/node_modules/**"
]
}
]
}
```

```
firefox developer edition
version: 119.0b2 (64-bit)
```

```
node version: 18.18.0
```

```
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.2134
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il problema con la configurazione di avvio di VS Code Firefox fornita in un progetto TypeScript webpack servito da WSL, confrontando gli URL localhost e di rete. Inizia analizzando come l’adattatore di debug di Firefox gestisce la corrispondenza degli URL, le source maps e pathMappings; il lavoro è completato quando i breakpoint vengono associati durante il debug dell’URL localhost, mentre il comportamento esistente dell’URL di rete continua a funzionare.

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

Valutazione

Stack tecnologico
linux, node.js, typescript, vscode, webpack
Ambito
developer-experience, 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.