firefox-devtools / firefox-devtools/vscode-firefox-debug
Breakpoints do not bind when debugging localhost url using WSL
- Dominant language
- TypeScript
- Stars
- 447
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Contributor guide
Assessment
This issue has not been assessed yet.