MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / do_run

Method do_run

tools/python-3.11.9-amd64/Lib/pdb.py:1085–1102  ·  view source on GitHub ↗

run [args...] Restart the debugged python program. If a string is supplied it is split with "shlex", and the result is used as the new sys.argv. History, breakpoints, actions and debugger options are preserved. "restart" is an alias for "run".

(self, arg)

Source from the content-addressed store, hash-verified

1083 do_n = do_next
1084
1085 def do_run(self, arg):
1086 """run [args...]
1087 Restart the debugged python program. If a string is supplied
1088 it is split with "shlex", and the result is used as the new
1089 sys.argv. History, breakpoints, actions and debugger options
1090 are preserved. "restart" is an alias for "run".
1091 """
1092 if arg:
1093 import shlex
1094 argv0 = sys.argv[0:1]
1095 try:
1096 sys.argv = shlex.split(arg)
1097 except ValueError as e:
1098 self.error('Cannot run %s: %s' % (arg, e))
1099 return
1100 sys.argv[:0] = argv0
1101 # this is caught in the main debugger loop
1102 raise Restart
1103
1104 do_restart = do_run
1105

Callers

nothing calls this directly

Calls 2

errorMethod · 0.95
splitMethod · 0.45

Tested by

no test coverage detected