-
Notifications
You must be signed in to change notification settings - Fork 236
Provide a bit more accurate "reason" for debug stop. #179
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
Provide a bit more accurate "reason" for debug stop. #179
Conversation
It turns out that when the debugger stops at a function breakpoint, it isn't necessarily obvious why the debugger stopped. There is no breakpoint glyph for a function breakpoint. So if we return "function breakpoint", then VSCode will display "PAUSED ON FUNCTION BREAKPOINT" in the call stack viewlet. Hopefully that will help the user know why the debugger stopped.
{ | ||
debuggerStoppedReason = | ||
e.Breakpoints[0] is CommandBreakpoint | ||
? "function breakpoint" |
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 like this style for ternary operators, cleaner than the one I normally use.
Awesome! Looks great. |
…reason Provide a bit more accurate "reason" for debug stop.
Could you please call them command breakpoints? They aren't function breakpoints, they are command breakpoints. They work for aliases, functions, cmdlets, and even executable applications. |
At the protocol layer we're speaking in VS Code's terms so that we're consistent with their experience. In the core library layer we'll definitely want to call them command breakpoints for sure. We'll get all of our terminology straight as we start cleaning up the APIs for 1.0 later this year. |
Yeah, we are trying to match the VSCode UI experience: This is one of those compromises you make when you're plugging into a multi-language editor like VSCode. BTW this is where the reason is used: When plugging in these services into ISE, ISE would use more PowerShell specific terms. Hmm, looking at this again I see a type in the service that I do need to rename |
Since VSCode is a multi-language editor, and since some of these languages may either (a) not have functions/have functions called something else (subroutine, procedure, etc), or (b) not have function breakpoints/have function breakpoints that are called something else, maybe a suggestion should be logged against VSCode that the terminology should change to command breakpoint in order to serve all languages better. |
Or perhaps VSCode could allow the extension to define a preferred alias for |
Localization is something I'm not looking forward to... |
It turns out that when the debugger stops at a function breakpoint, it isn't necessarily obvious why the debugger stopped. There is no breakpoint glyph for a function breakpoint. So if we return "function breakpoint", then VSCode will display "PAUSED ON FUNCTION BREAKPOINT" in the call stack viewlet. Hopefully that will help the user know why the debugger stopped.
See related VSCode issue - microsoft/vscode#3648