Vscode-powershell: Temporary Console does not allow interactive debugging via console

Created on 10 Apr 2018  路  17Comments  路  Source: PowerShell/vscode-powershell

System Details

  • Operating system name and version: Windows 10 Enterprise x64 1709
  • VS Code version:
    Version 1.22.0-insider
    Commit 5450fdc79778b5a76a27ea7e5fd68e9ebbe44107
    Date 2018-03-12T05:15:51.483Z
    Shell 1.7.9
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64
  • PowerShell extension version: 1.6.0

  • Output from $PSVersionTable:
    PSVersion 6.0.0-beta.9
    PSEdition Core
    GitCommitId v6.0.0-beta.9
    OS Microsoft Windows 10.0.16299
    Platform Win32NT
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
    WSManStackVersion 3.0

Issue Description

When using the Temporary Console launch configuration, "Powershell Launch Current File in Temporary Console" when a breakpoint is hit and you attempt to use the integrated console, the debugging console only accepts one input, does not actually do anything with the input and prevents further input into the console.

To reproduce:

  1. Change your configuration to, "Powershell Launch Current File in Temporary Console"
  2. Launch a script with a breakpoint
  3. Wait to hit the breakpoint and try to do something in the integrated console
Area-Debugging Issue-Bug

Most helpful comment

I can no longer reproduce this! Thanks!

All 17 comments

Did we meet at PSHSummit? Someone mentioned this to me yesterday :)

This sounds like a bug for sure.

Yep that was me! If I don't get lazy I've got a couple more to file tomorrow :)

Go crazy :) but do me a favor and search for your issue first - less work for me 馃槈

I'm hitting the same problem (was going to submit an issue but found this one). Is there some sort of a workaround for this problem? I need to use temporary console to make sure I'm starting up clean every time I update my script and don't need to worry about some stale environment states that could have left from previous debugging sessions.

My only workaround for now, is to use a separate (external) PS console, but since I can't attach to it (reported in #1322) I'm relying on some Set-PSBreakpoint magic, which, while being very powerful, is not as handy as the VSCode's debugging experience.

@strawgate + @Glober777: can you do me a favor and try to repro this on a newer version of PowerShell Core (6.0.2 or 6.1.0-preview.2)

Hey @tylerl0706, I've just tried it out (PS 6.1.0-preview.2) and got the same result. Here are the logs:
1527063331-767067ba-c982-48ad-b466-6dd416bff3c61527062828235.zip
image

As you can see, once I tried checking the output of variable $B, it returned the result but didn't give me the prompt for other interactive commands. If I do a step into\over (or continue to the next breakpoint)
I get to get a prompt again (and it's going to behave the same way)

Thanks for the repro @Glober777! This is a bug for sure.

Just to add, I was able to reproduce this with PowerShell 5.1

Please fix this.

I'd love to see this fixed!

This should work now. Does it not?

Tyler, I may be holding it wrong and attributing this bug incorrectly. I'll try to test this again soon and report back.

@TylerLeonhardt what I was trying to do, that led me down the rabbit hole to this bug is here: https://stackoverflow.com/questions/60697598/debug-powershell-cmdlet-written-in-c-in-vs-code

nope still does not work.

I'll have to give this a try on Windows as it doesn't repro on macOS.

Just tried again to re-pro this on my Windows machine, and am not seeing the issue, additional logs would be really appreciated!

I can no longer reproduce this! Thanks!

Was this page helpful?
0 / 5 - 0 ratings