From 7e02e8ec6d290d0625e8ef1bb3c501e19324e23c Mon Sep 17 00:00:00 2001 From: pablu Date: Sat, 28 Mar 2026 18:23:50 +0100 Subject: [PATCH] Fix module importing --- python/pybug_runtime.py | 6 ++++-- test.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python/pybug_runtime.py b/python/pybug_runtime.py index 9076405..b1067be 100644 --- a/python/pybug_runtime.py +++ b/python/pybug_runtime.py @@ -17,7 +17,7 @@ class PyBugBridgeDebugger(bdb.Bdb): return json.loads(sys.stdin.readline()) def user_line(self, frame: FrameType): - # print("TRACE:", frame.f_code.co_filename, frame.f_lineno) + print("TRACE:", frame.f_code.co_filename, frame.f_lineno) self.send( { "event": "stopped", @@ -30,7 +30,9 @@ class PyBugBridgeDebugger(bdb.Bdb): def interaction_loop(self, frame: FrameType): while True: + print("DEBUG: waiting for command", file=sys.stderr, flush=True) cmd = self.recv() + print(f"DEBUG: received command {cmd}", file=sys.stderr, flush=True) match cmd["cmd"]: case "continue": @@ -107,7 +109,7 @@ def main(): } dbg.set_step() - dbg.run(code, globals_dict, {}) + dbg.run(code, globals_dict, globals_dict) if __name__ == "__main__": diff --git a/test.py b/test.py index 9bc3f0a..03529f1 100644 --- a/test.py +++ b/test.py @@ -64,7 +64,6 @@ def generate_company(name: str, num_employees: int) -> Company: def main(): my_company = generate_company("TechCorp", 5) - print("All employees:") for emp in my_company.employees: print(emp)