@@ -20,7 +20,7 @@ on extensionFinalize
2020 remove the script of me from front
2121end extensionFinalize
2222
23-
23+ local sLastBreakInfo
2424
2525# ###############################################################################
2626#
@@ -534,6 +534,7 @@ end __SetValueDo
534534# Description
535535# Runs the currently debugging script until the next breakpoint
536536command revDebuggerRun
537+ delete variable sLastBreakInfo
537538 set the traceStack to empty
538539 set the traceUntil to 65535
539540 set the traceReturn to true
@@ -543,6 +544,7 @@ end revDebuggerRun
543544# Description
544545# Performs the debugger "stop" function, terminates the script currently being debugged
545546command revDebuggerStop
547+ delete variable sLastBreakInfo
546548 # When executing certain structures, the debugger will continue to loop until the
547549 # breakpoints property becomes empty. In order to make sure the debugger always
548550 # exits when asked to, we set the breakpoints to empty here and restore them again
@@ -2208,6 +2210,8 @@ local sLastAllowedContext
22082210# was called from, then updates the script editor. If the last debug action
22092211# was "Step Into", always updates the script editor.
22102212on trace pHandler, pLine, pPosition
2213+ delete variable sLastBreakInfo
2214+
22112215 local tTarget
22122216 put __ResolveTarget(the long id of the target, line - 2 of the executionContexts) into tTarget
22132217
@@ -2282,6 +2286,8 @@ end trace
22822286# all open script editors to switch to edit mode, then does the debugger run
22832287# action.
22842288on traceDone
2289+ delete variable sLastBreakInfo
2290+
22852291 # OK-2009-03-13 : Once we've got a traceDone, shut down the debugger first,
22862292 # as otherwise we have to trace through all the script editor code which slows things down.
22872293 revDebuggerRun
@@ -2306,6 +2312,19 @@ on traceError pHandler, pLine, pPosition, pError
23062312 pass traceError
23072313 end if
23082314
2315+ -- shield from same message with error being repeatedly called
2316+ local tBreakInfo
2317+ put the long id of the target into tBreakInfo ["target" ]
2318+ put pHandler into tBreakInfo ["handler" ]
2319+ put pLine into tBreakInfo ["line" ]
2320+ put pPosition into tBreakInfo ["position" ]
2321+ put pError into tBreakInfo ["error" ]
2322+ if tBreakInfo is sLastBreakInfo then
2323+ pass traceError
2324+ else
2325+ put tBreakInfo into sLastBreakInfo
2326+ end if
2327+
23092328 if item 1 of pError is kErrorRecursionLimit then
23102329 local tMessage
23112330 put "The handler: " & pHandler & " has reached the recursion limit of: " & the recursionLimit & "." & return & \
@@ -2382,6 +2401,17 @@ on traceBreak pHandler, pLine
23822401 pass traceBreak
23832402 end if
23842403
2404+ -- shield from same message with breakpoint being repeatedly called
2405+ local tBreakInfo
2406+ put the long id of the target into tBreakInfo ["target" ]
2407+ put pHandler into tBreakInfo ["handler" ]
2408+ put pLine into tBreakInfo ["line" ]
2409+ if tBreakInfo is sLastBreakInfo then
2410+ pass traceBreak
2411+ else
2412+ put tBreakInfo into sLastBreakInfo
2413+ end if
2414+
23852415 local tTarget
23862416 put __ResolveTarget(the long id of the target, line - 2 of the executionContexts) into tTarget
23872417
0 commit comments