-
Notifications
You must be signed in to change notification settings - Fork 138
Enhance DAP's setExceptionBreakpoints
command
#621
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
4bde807
to
7fe7ac2
Compare
7fe7ac2
to
be15123
Compare
@ono-max can you also give this a look? thx |
end | ||
{ | ||
verified: bp ? true : false, | ||
verified: !bp.nil?, |
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.
bp can be false?
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 don't think it should be false
in any case. If it's not added, it should just be nil
. Why do you expect it to be false
too?
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 want to know the reason why the change is needed (and not sure why yet).
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.
It's not a necessary change so if you don't want it I can revert it.
There are many types of Breakpoint uses an array as key. e.g. ISeqBreakpoint - `[:iseq, @iseq.path, @iseq.first_lineno]` So the current condition doesn't accurately selects line breakpoints.
Currently, if the request failed because the debugger exists early (broken pipe error), it doesn't provide the same information shown when a test fails. And that makes it hard to debug, so we should show helpful info in those cases as well.
It should return either `nil` (if bp is duplicated) or the `bp.inspect`. Currently it returns `true` for duplicated because of `bp.disable`.
1. Allow unset exception breakpoints by sending empty filters. 2. Support adding condition to exception breakpoints.
be15123
to
b784aaa
Compare
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.
Sorry for my late reviews.
Nice. LGTM
b784aaa
to
8ae2b10
Compare
Main Changes
Session#add_bp
should return eithernil
(duplicated bp being rejected) or theBreakpoint
object. Currently it returnstrue
for duplicated breakpoints (frombp.delete
), which makessetExceptionBreakpoints
returnsverify: true
incorrectly. (see the 3rd commit)setExceptionBreakpoints
command should clear all breakpoints before creating the assigned ones. Otherwise, it's not possible to deactivate exception breakpoints. After the changes, its behavior would followsetBreakpoints
command and align with debugpy's implementation.Other Changes
send_request
helper should also provide protocol messages when seeing exceptions (e.g. when the debugger exists expectedly). Currently it doesn't print those messages and makes it hard to debug.setExceptionBreakpoints
command, I also updatedreq_set_exception_breakpoints
helper.