Change debugger init signature.

This commit is contained in:
Stephen Chung
2022-11-25 13:20:03 +08:00
parent 6db9870fb1
commit fbe30b8d0e
6 changed files with 25 additions and 12 deletions

View File

@@ -604,7 +604,10 @@ fn main() {
#[allow(deprecated)]
engine.register_debugger(
// Store the current source in the debugger state
|_| "".into(),
|engine, mut debugger| {
debugger.set_state(engine.const_empty_string());
debugger
},
// Main debugging interface
move |context, event, node, source, pos| {
debug_callback(context, event, node, source, pos, &lines)