-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Extension debugging doesn't work with two IP6 network interfaces #144315
Comments
I added some logic for this that fixed the cases I could reproduce: https://github.com/microsoft/vscode-js-debug/blob/65160926b7cafccdc71da54a9587c65d66ca73c4/src/adapter/resourceProvider/basicResourceProvider.ts#L94-L99 However, maybe this doesn't work for you. I don't believe I have ready access to such a network locally, can you set a breakpoint around those lines and see why the fallback doesn't happen (or fails) on your machine? |
@connor4312 the fallback happens but doesn't help... here is my setup:
Here is a recording: CleanShot.2022-03-10.at.11.27.00.mp4If I change the launch config to use "127.0.0.1" js-debug is able to attach just fine: CleanShot.2022-03-10.at.11.43.01-converted.mp4Please note, that I was not able to hit any breakpoints in server.js in my setup. BTW, my network setup is:
|
If I don't get to this next debt week, I will just plan on tackling it in June when I'll be in the Zurich office solely for the opportunity to fix this bug ;) |
@connor4312 wow, that's an excellent move ;-) |
Looked into this in person. What's happening is that, while the fallback does "work", the initial request to localhost is timed out. The fallback happens, but the cancellation token is already cancelled at that point. |
Verified by @weinand |
@connor4312 since I'm in the office today, I could actually verify that this issue has been fixed in Insiders. |
VS Code's Extension debugging fails with the following message when the computer is connected to two IP6 network interfaces, e.g. a wired ethernet and WLAN:
To make investigation of this problem easier I was able to find a simpler repro:
node --inspect-brk=12345 server.js
Observe:
debugger cannot attach to server and console shows this:
"address": "127.0.0.1"
to the launch configObserve:
debugger attaches without problems.
Observe:
debugger cannot attach to server.
So it seems that using "localhost" does not always work and we should use "127.0.0.1" instead when connecting to the debug port.
@connor4312 could you please make sure that js-debug uses "127.0.0.1" as a fallback.
This is especially important for extension debugging because there it is not possible to specify an explicit address in the launch config.
/cc @alexdima
The text was updated successfully, but these errors were encountered: