Skip to content

Run one invocation per SetBreakpoints request #1117

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

Merged

Conversation

SeeminglyScience
Copy link
Collaborator

@SeeminglyScience SeeminglyScience commented Nov 26, 2019

Fixes PowerShell/vscode-powershell#2319

Previously for every SetBreakpoints request we would invoke ExecuteCommandAsync once for every single breakpoint. This change reduces that to a single call per request.

Before this change, if I followed the repro steps for PowerShell/vscode-powershell#2319, setting 10 breakpoints in File2 and File3, I couldn't even get it to launch once. With this change I can consistently launch every time.

There's definitely some race conditions in how runspace handles are queued, and the way this request handler was set up was really pushing that to it's limits. Those race conditions still need to be fixed, but this should help significantly in the mean time.

Previously for every SetBreakpoints request we would invoke
ExecuteCommandAsync once for every single breakpoint. This change
reduces that to a single call per request.
@TylerLeonhardt
Copy link
Member

This will get even better when we move to use the APIs in 7.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JustinGrote
Copy link
Collaborator

This so far appears to have fixed PowerShell/vscode-powershell#2319 for me.

@TylerLeonhardt TylerLeonhardt merged commit 3591ee1 into PowerShell:master Nov 26, 2019
@SeeminglyScience SeeminglyScience deleted the fix-breakpoint-spam branch November 26, 2019 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script fails to run on second run
4 participants