Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 81a8afb

Browse files
Merge pull request #1832 from montegoulding/remotedebuggerissues
[[ Bug 19359, 19357 ]] Remote debugger issues
2 parents 21d2018 + 0418da1 commit 81a8afb

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

Toolset/libraries/revdebuggerlibrary.livecodescript

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on extensionFinalize
2020
remove the script of me from front
2121
end 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
536536
command 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
545546
command 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.
22102212
on 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.
22842288
on 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

Toolset/palettes/script editor/behaviors/revsescripttabsbehavior.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ command addTab pObject
317317
put tControl into sTabButtonMap[the number of lines of the keys of sTabMap]
318318
set the cRawLabel of tControl to tFriendlyName
319319
set the visible of tControl to true
320-
set the cTooltip of tControl to the long name of tObject
320+
set the cTooltip of tControl to revDebuggerObjectLongName(tObject)
321321

322322
local tNewWidth
323323
put min(kMaxTabWidth, the cFormattedWidth of tControl + 5) into tNewWidth

notes/bugfix-19359.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure the debugger and remote debugger ignore breakpoints and errors if they are repeatedly triggered when execution has not been continued

0 commit comments

Comments
 (0)