Skip to content

Temporary Console does not allow interactive debugging via console #1263

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
strawgate opened this issue Apr 10, 2018 · 17 comments
Closed

Temporary Console does not allow interactive debugging via console #1263

strawgate opened this issue Apr 10, 2018 · 17 comments
Labels

Comments

@strawgate
Copy link

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
@TylerLeonhardt
Copy link
Member

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

This sounds like a bug for sure.

@strawgate
Copy link
Author

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

@TylerLeonhardt
Copy link
Member

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

@Glober777
Copy link

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.

@TylerLeonhardt
Copy link
Member

@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)

@Glober777
Copy link

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)

@TylerLeonhardt
Copy link
Member

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

@poshcodebear
Copy link

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

@Hypernut
Copy link

Hypernut commented Oct 7, 2019

Please fix this.

@tig
Copy link

tig commented Mar 15, 2020

I'd love to see this fixed!

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 15, 2020
@TylerLeonhardt
Copy link
Member

This should work now. Does it not?

@tig
Copy link

tig commented Mar 15, 2020

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

@tig
Copy link

tig commented Mar 15, 2020

@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

@Hypernut
Copy link

nope still does not work.

@TylerLeonhardt
Copy link
Member

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

@SydneyhSmith
Copy link
Collaborator

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

@strawgate
Copy link
Author

I can no longer reproduce this! Thanks!

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants