pub struct Debugger { /* private fields */ }Expand description
Main debugger struct
Implementations§
Source§impl Debugger
impl Debugger
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if debugger is running
Sourcepub fn breakpoint_count(&self) -> usize
pub fn breakpoint_count(&self) -> usize
Get number of breakpoints
Sourcepub fn add_breakpoint(&mut self, breakpoint: Breakpoint) -> usize
pub fn add_breakpoint(&mut self, breakpoint: Breakpoint) -> usize
Add a breakpoint
Sourcepub fn remove_breakpoint(&mut self, id: usize)
pub fn remove_breakpoint(&mut self, id: usize)
Remove a breakpoint
Sourcepub fn has_breakpoint_at(&self, file: &str, line: usize) -> bool
pub fn has_breakpoint_at(&self, file: &str, line: usize) -> bool
Check if there’s a breakpoint at a location
Sourcepub fn should_break_at(&mut self, file: &str, line: usize) -> bool
pub fn should_break_at(&mut self, file: &str, line: usize) -> bool
Check if should break at location
Sourcepub fn load_program(&mut self, ast: &Expr)
pub fn load_program(&mut self, ast: &Expr)
Load a program to debug
Sourcepub fn set_breakpoint_at_line(&mut self, line: usize)
pub fn set_breakpoint_at_line(&mut self, line: usize)
Set a breakpoint at a line
Sourcepub fn set_breakpoint_at_function(&mut self, _function: &str)
pub fn set_breakpoint_at_function(&mut self, _function: &str)
Set a breakpoint at a function
Sourcepub fn continue_execution(&mut self)
pub fn continue_execution(&mut self)
Continue execution
Sourcepub fn current_line(&self) -> usize
pub fn current_line(&self) -> usize
Get current line
Sourcepub fn current_function(&self) -> &str
pub fn current_function(&self) -> &str
Get current function
Sourcepub fn get_call_stack(&self) -> Vec<StackFrame>
pub fn get_call_stack(&self) -> Vec<StackFrame>
Get call stack
Sourcepub fn get_local_variables(&self) -> HashMap<String, String>
pub fn get_local_variables(&self) -> HashMap<String, String>
Get local variables
Sourcepub fn set_variable(&mut self, _name: &str, value: &str)
pub fn set_variable(&mut self, _name: &str, value: &str)
Set a variable value
Sourcepub fn get_output(&self) -> &str
pub fn get_output(&self) -> &str
Get output
Sourcepub fn remove_watch(&mut self, id: usize)
pub fn remove_watch(&mut self, id: usize)
Remove a watch
Sourcepub fn watch_count(&self) -> usize
pub fn watch_count(&self) -> usize
Get watch count
Sourcepub fn evaluate_watches(&self) -> Vec<(String, String)>
pub fn evaluate_watches(&self) -> Vec<(String, String)>
Evaluate all watches
Sourcepub fn enable_watch_notifications(&mut self)
pub fn enable_watch_notifications(&mut self)
Enable watch notifications
Sourcepub fn get_watch_changes(&self, _id: usize) -> Vec<WatchChange>
pub fn get_watch_changes(&self, _id: usize) -> Vec<WatchChange>
Get watch changes
Sourcepub fn get_events(&self) -> &[DebugEvent]
pub fn get_events(&self) -> &[DebugEvent]
Get debug events
Sourcepub fn line_to_offset(&self, source: &str, line: usize) -> usize
pub fn line_to_offset(&self, source: &str, line: usize) -> usize
Convert line number to byte offset
Sourcepub fn offset_to_line(&self, source: &str, offset: usize) -> usize
pub fn offset_to_line(&self, source: &str, offset: usize) -> usize
Convert byte offset to line number
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Debugger
impl RefUnwindSafe for Debugger
impl Send for Debugger
impl Sync for Debugger
impl Unpin for Debugger
impl UnwindSafe for Debugger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more