Skip to content

Cannot run debugger when offline #353

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

Closed
CendaL opened this issue Nov 29, 2016 · 6 comments
Closed

Cannot run debugger when offline #353

CendaL opened this issue Nov 29, 2016 · 6 comments
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@CendaL
Copy link

CendaL commented Nov 29, 2016

When one is offline, the debugger does not start. Here is a log:

Connecting to port: 13464
Socket connect ERROR: Error: getaddrinfo ENOENT undefined:13464
Socket closed, shutting down.
@daviwil
Copy link
Contributor

daviwil commented Dec 1, 2016

Hi Lukas, thanks for the report! I'll take a look.

@daviwil daviwil added the Issue-Bug A bug to squash. label Dec 1, 2016
@daviwil daviwil added this to the 0.8.0 milestone Dec 1, 2016
@daviwil
Copy link
Contributor

daviwil commented Dec 9, 2016

Hey Lukas, I can't seem to reproduce this issue even after trying it a few different ways. Some questions:

  • How are you offline when you see the problem? Airplane mode? No available wifi/ethernet connection?
  • Which operating system are you running?
  • Are you using VS Code Stable or Insiders? Can you try it with the Insiders release if you haven't yet?

Thanks!

@CendaL
Copy link
Author

CendaL commented Dec 15, 2016

I run Win10 enterprise. I have tried it again now with LAN not connected and WiFi adapter disabled (previously WiFi was unavailable) in both stable and insider version. Logs are basically the same: logs.zip

PSVersion                      5.1.14393.206                                                                           
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.14393.206                                                                          
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1  

@daviwil
Copy link
Contributor

daviwil commented Dec 15, 2016

Hey Lukas, can you try something for me? Open the following file in VS Code:

c:\Users\<your username>\.vscode\extensions\ms-vscode.PowerShell-0.7.2\out\debugAdapter.js

Go down to line 24, it should look like this:

let debugServiceSocket = net.connect(sessionDetails.debugServicePort);

Change that line so that it looks like this:

let debugServiceSocket = net.connect(sessionDetails.debugServicePort, '127.0.0.1');

Save the file then completely restart VS Code and try debugging a PowerShell script again. Any improvement? If so, I'll try to include a fix for today's release.

@CendaL
Copy link
Author

CendaL commented Dec 15, 2016

Yep, that works for me!

@daviwil
Copy link
Contributor

daviwil commented Dec 15, 2016

Awesome, thanks for confirming! I'll get a fix in for that :)

daviwil added a commit that referenced this issue Dec 15, 2016
Fix #353: Cannot start PowerShell debugger on Windows when offline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

2 participants