Closed rjmholt closed 4 years ago
(Note: eventually debugging comes back. @PrzemyslawKlys mentioned it might be a consequence of interacting with/cancelling the prompt)
Can't repro on macOS with a local build - can you try a local build?
@TylerLeonhardt have you seen: https://github.com/PowerShell/vscode-powershell/issues/2439 - it's quite easy to reproduce.
The repro steps are the same right @PrzemyslawKlys?
Hrmm, seems so. Have any code, press F5, any IntelliSense for parameters on next try doesn't work. Press Enter in console and everything works. So pressing F5, pressing Enter in console is the proper way to continue straight away. Or simply wait for "timeout" to happen (however not sure how long that is).
Yeah it looks like it's fixed in my local build unless there's a mac and windows behavior difference which is totally possible.
Yeah it looks like it's fixed in my local build unless there's a mac and windows behavior difference
I'll take a look today on my machine
So the root cause here is that the DisconnectHandler asks the PowerShellContextService to abort execution, which sets the session state to Aborted
. Since that's not Ready
, a number of things don't work. This issue is intermittent because of a race condition with running PowerShell commands overriding the state, but adding a lock causes it to reproduce all the time.
The problem now is that we need to understand why these session state concepts exist and what the cleanup from the aborted state is supposed to look like
Get-<Tab>
belowFrom the message log:
It seems that the PowerShellContextState isn't being set properly and so completions get skipped for some time after debugging has ended.