- pending_work_items: --> none
- milestone: Next_Release --> None
It would be very useful for debugging to support custom tracing. At its simplest something like...
/ Future ooRexx release /
call on EACHCLAUSE
-- code here
exit
/ Custom watch handler /
EACHCLAUSE:
-- condition delayed until return
if x > 0 | y < 0 then do
say '*** Watch triggered, Line=' sigl
say sourceline(sigl)
say 'Watch: X=' || x ', Y=' y
trace '?I'
-- ?? EACHCLAUSE remains delayed during
-- interactive trace
end
return
/ I have no idea how much overhead would be
involved. Maybe it should require an invocation
of a new option of TRACE to enable. To take it further...
/
/ Multiple Watch Handlers /
trace 'W' -- enable custom watch handling
-- WATCH condition raised if expr = .true
call on WATCH 'WATCH1' (x > 0 | y < 0)
call on WATCH 'WATCH2' (s \== '')
-- WATCH condition raised if X or Y changes value
call on WATCH 'WATCH1' VAR X Y
-- code
exit
WATCH1:
-- handler: display name, expr, etc.
WATCH2:
-- handler
/ Maybe it could be used from the trace prompt
to enter one-off watches:
trace> call on watch NONAME (x = 0) TRACE ?I
trace> trace 999
back to trace prompt after (x = 0) or 999 clauses/
/ eventually it would be nice if signal and call
handlers could be defined for CLASSes or PACKAGEs.
/
Anonymous