Enhance DAP's setExceptionBreakpoints command#621
Merged
ko1 merged 6 commits intoruby:masterfrom May 2, 2022
Merged
Conversation
4bde807 to
7fe7ac2
Compare
7fe7ac2 to
be15123
Compare
Member
Author
|
@ono-max can you also give this a look? thx |
ko1
reviewed
Apr 17, 2022
| end | ||
| { | ||
| verified: bp ? true : false, | ||
| verified: !bp.nil?, |
Member
Author
There was a problem hiding this comment.
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?
Collaborator
There was a problem hiding this comment.
I want to know the reason why the change is needed (and not sure why yet).
Member
Author
There was a problem hiding this comment.
It's not a necessary change so if you don't want it I can revert it.
ko1
approved these changes
Apr 17, 2022
ono-max
reviewed
Apr 20, 2022
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
ono-max
reviewed
Apr 28, 2022
Member
ono-max
left a comment
There was a problem hiding this comment.
Sorry for my late reviews.
Nice. LGTM
b784aaa to
8ae2b10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main Changes
Session#add_bpshould return eithernil(duplicated bp being rejected) or theBreakpointobject. Currently it returnstruefor duplicated breakpoints (frombp.delete), which makessetExceptionBreakpointsreturnsverify: trueincorrectly. (see the 3rd commit)setExceptionBreakpointscommand should clear all breakpoints before creating the assigned ones. Otherwise, it's not possible to deactivate exception breakpoints. After the changes, its behavior would followsetBreakpointscommand and align with debugpy's implementation.Other Changes
send_requesthelper 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.setExceptionBreakpointscommand, I also updatedreq_set_exception_breakpointshelper.