Skip to content

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

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
bchap1n opened this issue Jun 24, 2021 · 10 comments · Fixed by #2636
Closed

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

bchap1n opened this issue Jun 24, 2021 · 10 comments · Fixed by #2636
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed

Comments

@bchap1n
Copy link

bchap1n commented Jun 24, 2021

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.

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jun 24, 2021
@WorrenB
Copy link

WorrenB commented Jun 25, 2021

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

@andyleejordan
Copy link
Member

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

@bchap1n
Copy link
Author

bchap1n commented Jun 25, 2021

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

@andyleejordan
Copy link
Member

The fix is going to be PowerShell/PowerShellEditorServices#1514

@andyleejordan
Copy link
Member

Unless, @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?

@bchap1n
Copy link
Author

bchap1n commented Jun 28, 2021

@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

@andyleejordan
Copy link
Member

Hm, FYI @rjmholt we might have to prioritize bumping PSReadLine.

@daxian-dbw
Copy link
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.

@ghost ghost added the In-PR A PR is opened targeting the issue label Jul 1, 2021
@daxian-dbw
Copy link
Member

@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

@daxian-dbw daxian-dbw added Issue-Bug It 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. labels Jul 1, 2021
@ghost ghost added Resolution-Fixed and removed In-PR A PR is opened targeting the issue labels Jul 1, 2021
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 This issue was addressed in 2636, which has now been successfully released in v2.2.0-beta4. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants