Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints do not bind when debugging localhost url using WSL #344

Open
NicholasGentili1 opened this issue Sep 27, 2023 · 0 comments
Open
Labels

Comments

@NicholasGentili1
Copy link

NicholasGentili1 commented Sep 27, 2023

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

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [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_internals>/**",
                "**/node_modules/**"
            ],
            "pathMappings": [
                {
                    "url": "webpack://<my-cool-project>/src",
                    "path": "${workspaceFolder}/src"
                }
            ]
        },
        {
            "name": "chrome",
            "request": "launch",
            "type": "chrome",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "<node_internals>/**",
                "**/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
@nchevobbe nchevobbe added the bug label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants