Emit structured JSON --trace-eval events with source spans.
Tree walk logs enter_fn/stmt/leave_fn; bytecode logs op events for print/input/call/return, paving the way for view debug pause hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
30cd39fd8f
commit
fd36b92224
8 files changed
+190
-14
No files matched your search
+9
-1
@@ -141,8 +141,16 @@ pub fn run_file(path: &Path, opts: &RunOptions) -> Result<i32> {
|
||||
if opts.dump_bytecode {
|
||||
print!("{}", program.disassemble());
|
||||
}
|
||||
let mut vm = Vm::new(Some(path)).with_stdin(opts.stdin_lines.clone());
|
||||
let mut vm = Vm::new(Some(path))
|
||||
.with_stdin(opts.stdin_lines.clone())
|
||||
.with_trace(opts.trace_eval);
|
||||
if opts.trace_eval {
|
||||
eprintln!("=== marqdo: trace-eval ({path_label}) ===");
|
||||
}
|
||||
vm.run(&program)?;
|
||||
if opts.trace_eval {
|
||||
eprintln!("=== marqdo: end trace-eval ===");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user