What does your feature request improve on? Please describe.
Enabling conditional breakpoints will improve the usability of the debugger far more than it currently is.
Describe the solution you'd like
Enable conditional breakpoints (breakpoints which are only evaluated under a certain condition). It shall be possible that the condition uses all symbols available in the current code context. Editing the conditional breakpoint might be doable by adding a special context menu to the margin.
This new feature requires to have a structure for a breakpoint, which is managed within the BreakpointManager. The BreakpointManager should have a method for evaluating the conditional expression assigned to the conditional breakpoint (if any, defaults to true) and returning its result as boolean value (this is then used by all locations in code, where breakpoints are evaluated).
Consider that in locations, where variable names are mangled, it is necessary to have the possibility to temporarily mangle the name of all variables used in the condition as well. Temporarily, because recursive calls of procedures will have different names as well as different runs of the same code may have different mangled names.
For the evaluation of the condition, get inspired by the functions evaluating the conditions for while and if.
For the editor, either use a different marker colour for conditional breakpoints (e.g. violet or orange) or switch to a different symbol, e.g. the rounded rectangle. The interaction with the breakpoint can be added to the usual context menu as it already knows, that there's a breakpoint on the current line.
DESCRIPTION
What does your feature request improve on? Please describe. Enabling conditional breakpoints will improve the usability of the debugger far more than it currently is.
Describe the solution you'd like Enable conditional breakpoints (breakpoints which are only evaluated under a certain condition). It shall be possible that the condition uses all symbols available in the current code context. Editing the conditional breakpoint might be doable by adding a special context menu to the margin.
Additional context Migrated from here: https://sourceforge.net/p/numere/tickets/786/
(Do not write below this line)
DEVS' SECTION
ANALYSIS
This new feature requires to have a structure for a breakpoint, which is managed within the
BreakpointManager
. TheBreakpointManager
should have a method for evaluating the conditional expression assigned to the conditional breakpoint (if any, defaults totrue
) and returning its result as boolean value (this is then used by all locations in code, where breakpoints are evaluated).Consider that in locations, where variable names are mangled, it is necessary to have the possibility to temporarily mangle the name of all variables used in the condition as well. Temporarily, because recursive calls of procedures will have different names as well as different runs of the same code may have different mangled names.
For the evaluation of the condition, get inspired by the functions evaluating the conditions for
while
andif
.For the editor, either use a different marker colour for conditional breakpoints (e.g. violet or orange) or switch to a different symbol, e.g. the rounded rectangle. The interaction with the breakpoint can be added to the usual context menu as it already knows, that there's a breakpoint on the current line.
IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST