-
Notifications
You must be signed in to change notification settings - Fork 510
VS Code PowerShell debugging fails in flight mode #1105
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
Comments
Just so we're on the same page here. @markgossa, "flight mode" is the same as "airplane mode"? |
Hi @tylerl0706, yes. It's basically having no internet access. I think it needs access yo a particular URL to start PowerShell which I found out when I tried to use VSCode on my flight :-) |
I don't think the extension needs external access however it does use a socket to talk to the out-of-process PowerShellEditorServices module. That module provides the language and debugging services. You can see this from the VSCode-powershell.log file:
But this is a localhost socket so not sure why airplane mode would disable it. Can you put your laptop in airplane mode and see if this PowerShell script works: Try calling |
@daviwil I wonder if on this line: We should use |
You can certainly give that a shot. I've also been skeptical of the port availability check in Start-EditorServices.ps1, something I'm doing there might be causing initialization to fail early. |
Hi @rkeithhill, I ran the Get-AvailablePort with or without an internet connection and it gives me a random port both times. |
Thanks for testing that. I can't repro the problem and I'm on Windows 10 16299 as well. :-( |
@rkeithhill - thanks for the reply and apologies for the delay in getting back to you. I've just confirmed the issue on another one of my Windows 10 machines. This time running 1703 build 15063. To reproduce it:
You should see a notification in bar at the bottom saying "Starting PowerShell" but it never does. Session logs are below: 2017-12-7 20:50:15 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path. I can connect to localhost on this port using Test-NetConnection using the IPv4 loopback address 127.0.0.1 but not the IPv6 loopback address ::1 Let me know what you find or if you have more diagnostics you want me to run. |
@rkeithhill @daviwil - I found that if I create a loopback adapter then everything works fine when offline. Potentially this will help troubleshooting but it's a good workaround for me for now. |
@markgossa We made a change in |
The switch to using named pipes in the next release should fix this issue - see #1327 |
Closing this because of what Keith said 😄 |
From @markgossa on November 17, 2017 3:12
Steps to Reproduce:
It just says "Starting PowerShell" in the bottom right and doesn't start it then times out.
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#38576
The text was updated successfully, but these errors were encountered: