Conditional breakpoints always break.
seraku24 opened this issue · comments
When setting a conditional breakpoint, the resulting breakpoint is triggered every time the line is hit, not just when the specified condition is true
.
In reviewing the code, I see that ruby-debug-ide
accepts the break ... if ...
command and passes it along to debase
, which records the provided expression. But then, neither ruby-debug-ide
nor debase
does anything with the expression.
Am I overlooking something?
@seraku24 that's right, that part of the code never made it from ruby-debug-base to debase as I was implementing it for RubyMine and RM handles conditions in breakpoints on IDE side. I can try to look at it, but it may be more productive to create a pull request as it will take some time for me to set up all the environment
Relates to #11
Thanks for the confirmation. (:
I can certainly take a stab at this issue. I just need get acclimated to this project and how to build and test it. Are there any quirks with this project that I should be aware of?
There are some failing tests: test_current_context
and test_catchpoints
that you should not worry about.
You probably would need to patch check_breakpoint_by_pos
in breakpoint.c to add check for expr if it's present.
Otherwise it's just bundle install
and rake test
:)
Also, this is implemented in byebug
and byebug
's C-extension part was originally forked from debase
. So you might want to use the project as a reference. 😉
@deivid-rodriguez Thanks! Looks similar to what I ended up doing in sketchup-ruby-debugger
, but it is always useful to have as much reference as possible just in case. (:
Sure! :)