DebuggerState

Struct DebuggerState 

Source
pub struct DebuggerState { /* private fields */ }
Expand description

Core debugger state

Implementations§

Source§

impl DebuggerState

Source

pub fn new() -> Self

Create a new debugger state

Source

pub fn activate(&mut self)

Activate the debugger

Source

pub fn deactivate(&mut self)

Deactivate the debugger

Source

pub fn is_active(&self) -> bool

Check if debugger is active

Source

pub fn set_breakpoint(&mut self, bp_type: BreakpointType) -> usize

Set a breakpoint and return its ID

Source

pub fn remove_breakpoint(&mut self, id: usize) -> bool

Remove a breakpoint by ID

Source

pub fn remove_all_breakpoints(&mut self)

Remove all breakpoints

Source

pub fn toggle_breakpoint(&mut self, id: usize, enabled: bool) -> bool

Enable or disable a breakpoint

Source

pub fn get_breakpoint(&self, id: usize) -> Option<&Breakpoint>

Get a breakpoint by ID

Source

pub fn list_breakpoints(&self) -> Vec<&Breakpoint>

List all breakpoints

Source

pub fn set_execution_mode(&mut self, mode: ExecutionMode)

Set the execution mode

Source

pub fn execution_mode(&self) -> &ExecutionMode

Get the current execution mode

Source

pub fn set_step_over_depth(&mut self, depth: usize)

Set the step over depth

Source

pub fn clear_step_over_depth(&mut self)

Clear the step over depth

Source

pub fn update_location(&mut self, file: String, line: usize)

Update current location

Source

pub fn current_location(&self) -> Option<&(String, usize)>

Get current location

Source

pub fn should_pause_at_function(&mut self, func_name: &str) -> bool

Check if a function breakpoint should trigger

Source

pub fn should_pause( &mut self, file: &str, line: usize, call_stack_depth: usize, ) -> bool

Check if execution should pause at the given location

Trait Implementations§

Source§

impl Default for DebuggerState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.