-
Notifications
You must be signed in to change notification settings - Fork 234
Fix PSES crash on debug start when function breakpoint defined #624
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
Conversation
Fixex PowerShell/vscode-powershell#1159 When VSCode passes us a breakpoint to set, we normally set a flag to indicate "setBreakpointInProgress" so that when the DebugService_BreakpointUpdated event is fired, we can tell that we initiated it instead of the user using Set-PSBreakpoint to set a breakpoint. Well, the code that handled function breakpoints msgs sent by VSCode was not setting that flag. Also, when the user does use Set-PSBreakpoint -Command there is no debug protocol event for function breakpoints so we need to ignore this type of breakpoint set by the user until the debug protocol support it. See https://github.com/Microsoft/vscode-debugadapter-node/issues/157
Hmm, all the Microsoft.PowerShell.EditorServices.Test.dll tests pass on my machine:
|
AppVeyor likes to throw a fit every once in a while. We're good now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks, Keith!
|
||
// try | ||
// { | ||
// // Set exception breakpoints in DebugService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we need this commented out code? If so, can you supply a reason in the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hoping we will eventually get support for breaking on unhandled exceptions (maybe even first thrown). When we do, I don't want to have the same mistake of not setting the setBreakpointInProgress flag. That was the one of the causes of the crash. I can add a comment along those lines.
@tylerl0706 Can you kick the appveyor build? |
kicked ⚽ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks Keith!
Add version update notification
Fixex PowerShell/vscode-powershell#1159
When VSCode passes us a breakpoint to set, we normally set
a flag to indicate "setBreakpointInProgress" so that when
the DebugService_BreakpointUpdated event is fired, we can
tell that we initiated it instead of the user using Set-PSBreakpoint
to set a breakpoint. Well, the code that handled function
breakpoints msgs sent by VSCode was not setting that flag.
Also, when the user does use Set-PSBreakpoint -Command
there is no debug protocol event for function breakpoints
so we need to ignore this type of breakpoint set by the user
until the debug protocol support it.
See https://github.com/Microsoft/vscode-debugadapter-node/issues/157