Does anyone have any tips on interrupting a runaway app? I occasionally (hmm) have algorithms under development, typically recursive, that become uninterruptible by ctrl-dot or ctrl-c (which only seems to happen when I have forgotten to save a couple hours work of course). What I sometimes do is a debugging kluge:
Code: Select all
global gEmergencyStop -- Set to 0 on openStack
global gWhoaNelly -- Set to some appropriate max value like 10 million on openStack
-- Called as the first line in all recursive subroutines and major loops
-- as in - eStop "in wbSuspectFunctionName"
on eStop pTargetMessage
add 1 to gEmergencyStop
if (gEmergencyStop > gWhoaNelly) then
answer "eStop" && pTargetMessage
exit to top
end if
end eStop
Thanks!
Walt