Add commands and status to debugging interface.

This commit is contained in:
Stephen Chung
2022-02-01 22:30:05 +08:00
parent dca0185323
commit 7163a7331a
11 changed files with 351 additions and 183 deletions

View File

@@ -202,8 +202,11 @@ impl Engine {
level: usize,
) -> RhaiResult {
#[cfg(feature = "debugging")]
let reset_debugger =
self.run_debugger_with_reset(scope, global, state, lib, this_ptr, stmt, level)?;
let reset_debugger = if self.debugger.is_some() {
self.run_debugger_with_reset(scope, global, state, lib, this_ptr, stmt, level)?
} else {
None
};
// Coded this way for better branch prediction.
// Popular branches are lifted out of the `match` statement into their own branches.