Add Start/End to DebuggerEvent.

This commit is contained in:
Stephen Chung
2022-04-26 16:36:24 +08:00
parent 34dfe841cd
commit 2889ca0988
13 changed files with 96 additions and 39 deletions

View File

@@ -191,6 +191,14 @@ impl Engine {
let result = self.eval_ast_with_scope_raw(scope, global, ast, 0)?;
#[cfg(feature = "debugging")]
if self.debugger.is_some() {
global.debugger.status = crate::eval::DebuggerStatus::Terminate;
let lib = &[ast.as_ref()];
let node = &crate::ast::Stmt::Noop(Position::NONE);
self.run_debugger(scope, global, lib, &mut None, node, 0)?;
}
let typ = self.map_type_name(result.type_name());
result.try_cast::<T>().ok_or_else(|| {