Closed firelizzard18 closed 4 years ago
Thanks @firelizzard18! Is there any user facing command to actually unset this?
Actually I now see from your issue and hit_condition
is not really exposed and can only be used programamtically. Any ideas on how to better expose it?
In any case, this looks good!
Any ideas on how to better expose it?
ConditionCommand
could be modified to support hit conditions. Possibly:
cond[ition] [expr[ession]] <n>[ expr]
cond[ition] hit[count] <n>[ <op> value]
Implemented as:
case @match[:mode]
when nil, 'expr', 'expression'
breakpoint.expr = @match[:expression]
when 'hit', 'hitcount'
breakpoint.hit_condition = @match[:operation].to_sym
breakpoint.hit_value = @match[:value].to_i
else
# raise error
end
Since the code in the extension is already there, makes sense to add it. I like your proposal :+1:.
Closes #739.
This MR modifies
brkpt_set_hit_condition
inext/byebug/breakpoint.c
to allow clearing a breakpoint's hit condition by setting it to nil. The documentation on the function indicates this should be possible, but passing nil will raise an exception, and no code path in the function will set the condition toHIT_COND_NONE
.