Skip to content

Debugger should retry until extension loads or give error when it times out #418

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
Glober777 opened this issue Dec 29, 2016 · 1 comment
Labels
Issue-Bug A bug to squash.

Comments

@Glober777
Copy link

System Details

  • Operating system name and version: Windows 10 Enterprise
  • VS Code version: 1.8.1
  • PowerShell extension version: 0.8.0
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.14393.576
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.576
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Hi,

Today I've noticed an issue where a debug adapter terminates immediately when I try to debug one of my scripts. Interestingly, the popups regarding termination repeats twice, and if you look into the 'Developer Tools' console there's this:
messageService.ts:126Debug adapter process has terminated unexpectedlye.doShow @ messageService.ts:126

Neither EditorServices.log nor vscode-powershell.log logs for the session have any mention of the issue.

While trying to figure out a reliable repro, I discovered that this issue occurs if VSCode is started and debugging is initiated while PowerShell is being loaded:
image

If I wait for loading to finish and start debugging afterwards, all goes fine. Is it possible to add some logic so that VSCode would wait for PowerShell to finish loading instead of crashing?

Thanks!

Attached Logs

I haven't attached the logs as there are no errors and it has some sensitive data. If needed, I can send it over the email.

@daviwil
Copy link
Contributor

daviwil commented Jan 3, 2017

Thanks @Glober777! This is part of the reason why I added the loading indicator, to make it more obvious when the extension hasn't finished loading yet. The missing piece here is some clear indication from the debugger that the PowerShell extension is still loading. Unfortunately they don't give me a way to return an explicit error message (or I haven't found a way yet, at least). I'll keep looking into it!

@daviwil daviwil changed the title Debug adapter process has terminated unexpectedly (if debugging is started before PowerShell is loaded) Debugger should give explicit error message if run when PowerShell extension isn't fully loaded yet Jan 3, 2017
@daviwil daviwil added the Issue-Bug A bug to squash. label Jan 3, 2017
@daviwil daviwil changed the title Debugger should give explicit error message if run when PowerShell extension isn't fully loaded yet Debugger should retry until extension loads or give error when it times out Jan 12, 2017
daviwil added a commit that referenced this issue Jan 12, 2017
Fix #418: Debugger should retry if extension isn't loaded yet
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