-
Notifications
You must be signed in to change notification settings - Fork 512
Script fails to run on second run #2319
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
Script fails to run on second run #2319
Comments
This was driving me nuts! I didn't get to even run a script once. But after removing all breakpoints on all files debugging actually starts to debug now. |
@DarkLite1 thanks for opening this-- @TylerLeonhardt has a repro and is actively working on this |
For those of you having the issue, would you mind testing out this version? It should fix the issue. Let me know if you need help installing it. |
@TylerLeonhardt was just about to open a related issue for pester test debugging. Here's the repro and logs I'll test and check. |
1574440280-681c2e52-1b1b-4349-8442-7913617615f01574440221069.zip EDIT: Note I just have to restart the powershell session to get it working again, don't have to do a whole reload window. EDIT2: Seems to be a bit inconsistent actually, right now it's working fine and not hanging, hmm... EDIT3: Timeout issue maybe? Seems to happen if I leave it alone for a while. If I do a bunch in rapid succession they seem to work fine. Trying to get it consistent.
|
hmm @JustinGrote this could be specific to Pester debugging. I'll do some digging. I do want to check to make sure @DarkLite1's issue (with regular non-Pester debugging) is fixed with that change I made. |
@TylerLeonhardt thanks for the effort but no, sadly it's still not working with your updated extension. What I can see is that the code is now executed 2 to 5 times without any issue, but after x tries of hitting On top of this my example is the most simplified version. Because I also noticed it running other files like |
Thanks @DarkLite1 - I'll try to replicate your environment to see if I can repro. |
@SeeminglyScience has a fix out for this. @SeeminglyScience if you wanna provide a test vsix for these folks, feel free to upload one. |
@TylerLeonhardt I dumped the artifacts from the build: https://dev.azure.com/powershell/PowerShellEditorServices/_build/results?buildId=39793 into my extensions module folder, and @SeeminglyScience's fix so far seems to be working for me. I ran it thru about 10-15 times and looking good so far. I'll stress test it tomorrow during development. |
Closing as the PR to fix this issue has been merged: PowerShell/PowerShellEditorServices#1117 |
On request of @TylerLeonhardt in #2175 I am creating this as a separate issue.
Description
When breakpoints are set in at least two other open files, the current open file (which does not contain a breakpoint) can only be executed once. Upon a second execution
vscode-insders
freezes.Steps to reproduce the issue:
File1.ps1
contains code with no breakpoint (Ex.Get-Process
)File2.ps1
contains code with a breakpoint (Ex.Start-Sleep -Seconds 1
, breakpoint line 1)File3.ps1
contains code with a breakpoint (Ex.Start-Sleep -Seconds 1
, breakpoint line 1)File1.ps1
is focused pressF5
Notice that
Get-Process
is executed correctly and all processes are retrievedF5
again and notice thatGet-Process
is not executed, an orange bar is displayed at the bottom and the debug panel to stop debugging is floating at the top but doesn't respond to any clicks and stays there.Workarounds:
vscode-insiders
to have one other successful runSystem details
@rjmholt I hope you can simulate this properly now. I'm currently using
PowerShell Preview 2019.11.0
andvscode-insiders
:The text was updated successfully, but these errors were encountered: