MCPcopy Create free account
hub / github.com/microsoft/debugpy / run_code

Function run_code

src/debugpy/server/cli.py:397–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395
396
397def run_code():
398 if options.target is not None:
399 # Add current directory to path, like Python itself does for -c.
400 sys.path.insert(0, str(""))
401 code = compile(options.target, str("<string>"), str("exec"))
402
403 start_debugging(str("-c"))
404
405 log.describe_environment("Pre-launch environment:")
406 log.info("Running code:\n\n{0}", options.target)
407
408 eval(code, {})
409 else:
410 log.error("No target to run.")
411
412
413def attach_to_pid():

Callers

nothing calls this directly

Calls 3

start_debuggingFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…