Add parameter to debugger init.
This commit is contained in:
@@ -10,10 +10,10 @@ use std::{fmt, iter::repeat, mem};
|
||||
|
||||
/// Callback function to initialize the debugger.
|
||||
#[cfg(not(feature = "sync"))]
|
||||
pub type OnDebuggingInit = dyn Fn() -> Dynamic;
|
||||
pub type OnDebuggingInit = dyn Fn(&Engine) -> Dynamic;
|
||||
/// Callback function to initialize the debugger.
|
||||
#[cfg(feature = "sync")]
|
||||
pub type OnDebuggingInit = dyn Fn() -> Dynamic + Send + Sync;
|
||||
pub type OnDebuggingInit = dyn Fn(&Engine) -> Dynamic + Send + Sync;
|
||||
|
||||
/// Callback function for debugging.
|
||||
#[cfg(not(feature = "sync"))]
|
||||
|
@@ -106,7 +106,7 @@ impl GlobalRuntimeState<'_> {
|
||||
crate::eval::DebuggerStatus::CONTINUE
|
||||
},
|
||||
if let Some((ref init, ..)) = engine.debugger {
|
||||
init()
|
||||
init(engine)
|
||||
} else {
|
||||
Dynamic::UNIT
|
||||
},
|
||||
|
Reference in New Issue
Block a user