Skip to content

Commit f7e2a83

Browse files
committed
fix(pmdb): print <expr> command handle missing argument
1 parent 4da420d commit f7e2a83

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
@@ -85,6 +85,10 @@ def enable(debuggerGlobalObject = pm.eval("debuggerGlobal")):
8585
case "exec":
8686
case "print": {
8787
// Execute an expression in debugging script's context and print its value
88+
if (!rest) {
89+
print(`"print <expr>" command requires an argument.`)
90+
continue blockingLoop;
91+
}
8892
const result = frame.eval(rest)
8993
if (result.throw) printErr(result.throw) // on error
9094
else print(result.return) // on success

0 commit comments

Comments
 (0)