-
Notifications
You must be signed in to change notification settings - Fork 511
Not in file Scriptblock debugging create empty temporary file #3904
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
Not in file Scriptblock debugging create empty temporary file #3904
Comments
I noticed this as well while working on something attach to process related. Glad to know it's not something I just broke :) Lookin' into it, thanks @ili101! |
Has this continued to repro? |
Yes still broken in preview |
Yep it's on my list but I haven't actually done anything to fix it yet. I was initially thinking it wouldn't be a blocker but this might make debugging pester tests in particular a huge PITA. Assuming Pester still creates anonymous scriptblocks for mocks anyway |
From Patrick: The remote file manager is for some reason not populating the file in this scenario, but is creating it. |
Easy way to repro: type "Wait-Debugger" in console. |
Ok I have a partial answer. Debugging this, in the PSCommand psCommand = new PSCommand().AddScript($"list 1 {int.MaxValue}");
IReadOnlyList<PSObject> scriptListingLines =
await _executionService.ExecutePSCommandAsync<PSObject>(
psCommand, CancellationToken.None).ConfigureAwait(false); Hence why that temporary file is empty. |
Sorry this took so long @ili101 but it will be fixed in the next pre-release! |
Prerequisites
Summary
On stable a temporary file is created with the content of the scriptblock and debugged normally.
On preview temporary empty file is created.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: