-
Notifications
You must be signed in to change notification settings - Fork 138
Support functional setFunctionBreakpoints command
#625
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
|
I couldn't determine the specification about what is "function" breakpoints on DAP. What happens? |
|
Also do you receive the requests about this feature? |
|
You can set a function breakpoint like this: And it can work just like |
I want this feature myself. And since it's marked as supported, I think we should make it work anyway. |
15625f5 to
86416a1
Compare
|
I see.
I'll rewrite them for 1.6. |
I don't understand why it needs to be rejected. If |
Please stop the program and re-start the debugging. |
|
Sorry I'm not sure if I get the point. |
86416a1 to
ce60064
Compare
|
@ko1 regarding that case, I don't mean we should support it. But since it works, I don't think it's a high priority to prohibit it. I do mark it as unintentional supported in the description though. I also have added condition supports for it and uploaded 2 demos videos. I think it's ready for review now. |
|
cc @ono-max |
6e96c49 to
fe730fa
Compare
| Sends request to rdbg to set function breakpoints. e.g. | ||
|
|
||
| ```rb | ||
| req_set_function_breakpoints([{ name: "Foo#bar", condition: "a == 1" }]) |
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.
For me, I'd prefer to use req_add_function_breakpoint(breakpoint) to match with req_add_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.
Because it can also remove breakpoints, I think it's better to use set. I prefer renaming other helpers instead, wdyt?
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.
If I have to say, I'd like to choose add. there are two options in this case.
If we align with DAP, set is better. Users who are familiar with DAP should understand it easily.
On the other hand, add and remove are better in the context of CDP.
When I design breakpoint method, I decided to use add and remove because they are more intuitive than set.
fe730fa to
83b6ca8
Compare
|
At the breakpoint, it is possible to set a BP for
|

Currently, DAP server responds to
setFunctionBreakpointscommand but it doesn't really do anything. This PR enables adding/removing method breakpoints.Supported breakpoint types:
Foo#foo- will stop atFoo's instance methodfooFoo.bar- will stop atFoo's singleton methodbarThis is not intentionally supported but currently it works:
foo.foo- will stop atfooobject's#foomethod callCondition is also supported:
Demos
Function Breakpoint
Function.breakpoints.mov
Function Breakpoint with Conditions
Function.breakpoints.with.condition.mov