Skip to content

Commit 078cb13

Browse files
committed
fix(pmdb): skipping when already enabled
1 parent 8718f22 commit 078cb13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/pythonmonkey/lib/pmdb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def debuggerInput(prompt: str):
1515
return ""
1616

1717
def enable(debuggerGlobalObject = pm.eval("debuggerGlobal")):
18+
if debuggerGlobalObject._pmdbEnabled:
19+
return # already enabled, skipping
20+
21+
debuggerGlobalObject._pmdbEnabled = True
1822
debuggerGlobalObject.eval("""(debuggerInput, _pythonPrint, _pythonExit) => {
1923
const dbg = new Debugger()
2024
const mainDebuggee = dbg.addDebuggee(mainGlobal)

0 commit comments

Comments
 (0)