Skip to content

upgrading from 2.2.0-beta2 > beta3 broke Powershell debugger in vscode #2616

Closed

Description

@bchap1n

Environment

PS version: 7.1.3
PSReadline version: 2.2.0-beta3
os: 10.0.19041.1 (WinBuild.160101.0800)
PS file version: 7.1.3.0
HostName: Visual Studio Code Host
BufferWidth: 238
BufferHeight: 10

Exception report

Steps to reproduce

Upgrade to PSReadline 2.2.0-beta3 from PSReadline 2.2.0-beta2
Open new PowerShell script in VSCode, set breakpoint on first line, and launch debugger

This happens in latest vscode and vscode-insiders, Powershell/Powershell-Insiders Extension and with Powershell 7.1+ and 7.2+

Expected behavior

debugger should pause at the breakpoint

Actual behavior

debugger just hangs and I can either pause or stop

notes

I tried rolling back powershell extension, and rebooting.

Activity

  1. ghost added
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Jun 24, 2021
  2. WorrenB commented on Jun 25, 2021

    @WorrenB

    seems to be related to PSReadLine 2.2.0-beta 3 breaks extension
    in my case I couldn't use F8 (Run Selections) either

  3. andyleejordan commented on Jun 25, 2021

    @andyleejordan
    Member

    brock chapin (@bchap1n) and WorrenB Can you please downgrade your PSReadLine to the latest compatible version (i.e. the one we ship with the extension) 2.1.0?

    PowerShell/vscode-powershell#3393 (comment)

  4. bchap1n commented on Jun 25, 2021

    @bchap1n
    Author

    Andy Jordan (@andschwa) 2.1.0 and 2.2.0-beta2 both work ok for me.

    The problem is that I can't use Powershell Preview 7.2.* at all without PSReadline 2.2.0-beta3 and there is no work-around for that.

  5. andyleejordan commented on Jun 25, 2021

    @andyleejordan
    Member
  6. andyleejordan commented on Jun 25, 2021

    @andyleejordan
    Member

    Unless, Dongbo Wang (@daxian-dbw), will PowerShell Preview 7.2.x be incompatible with PSReadLine 2.1.0 at some point? Like, what's our priority to upgrade the bundled PSReadLine to 2.2.0?

  7. bchap1n commented on Jun 28, 2021

    @bchap1n
    Author

    Andy Jordan (@andschwa) I see your question was directed at dbw but I understand that PowerShell Preview 7.2.0-preview.7 is not compatible with PSReadLine 2.1.0

  8. andyleejordan commented on Jun 29, 2021

    @andyleejordan
    Member

    Hm, FYI Rob Holt (@rjmholt) we might have to prioritize bumping PSReadLine.

  9. daxian-dbw commented on Jul 1, 2021

    @daxian-dbw
    Member

    will PowerShell Preview 7.2.x be incompatible with PSReadLine 2.1.0 at some point? Like, what's our priority to upgrade the bundled PSReadLine to 2.2.0?

    Yes, 2.1.0 works with all 7.2 preview releases. It's safe to bundle PSES with 2.1.0 PSReadLine.

  10. ghost added
    In-PRA PR is opened targeting the issue
    on Jul 1, 2021
  11. daxian-dbw commented on Jul 1, 2021

    @daxian-dbw
    Member

    Rob Holt (@rjmholt) found out the root cause why 2.2.0-beta3 breaks VSCode debugging:

    public static string ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
    {
    return ReadLine(runspace, engineIntrinsics, _defaultCancellationToken, lastRunStatus: null);
    }

    The cancellationToken should be passed along instead of using the default token. PR is out: #2636

  12. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    and removed
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Jul 1, 2021
  13. ghost removed
    In-PRA PR is opened targeting the issue
    on Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Resolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions