simvx.ide.debug_session

Debug session — DAP client lifecycle, breakpoint sync, IDE menu actions.

Module Contents

Classes

DebugSession

Owns the active debug session and exposes IDE menu/run actions.

Data

log

API

simvx.ide.debug_session.log

‘getLogger(…)’

class simvx.ide.debug_session.DebugSession(state: simvx.ide.state.State, config: simvx.ide.config.Config, ide: simvx.ide.app.Root | None = None)[source]

Owns the active debug session and exposes IDE menu/run actions.

Creates/destroys DAPClient instances per session, syncs breakpoints from State, caches thread/stack/scope/variable data for the UI, and provides the run/debug action handlers used by menu items and shortcuts.

Initialization

start_debug(path: str)[source]

Start debugging a Python file.

stop_debug()[source]

Stop the current debug session.

continue_execution()[source]
step_over()[source]
step_into()[source]
step_out()[source]
pause()[source]
toggle_breakpoint(path: str, line: int)[source]
evaluate(expr: str, callback=None)[source]

Evaluate expression in the current frame context.

If callback is provided, the parsed result string (or dict on error) is forwarded to it instead of being emitted to debug_output.

set_breakpoint_condition(path: str, line: int, condition: str)[source]

Set or clear a condition on a breakpoint.

get_breakpoint_condition(path: str, line: int) str[source]

Get the condition for a breakpoint, or empty string.

get_conditions_for_file(path: str) dict[int, str][source]

Get all conditions for a file as {line: condition}.

select_frame(frame_index: int)[source]

Select a stack frame by index, refreshing scopes and variables.

fetch_variables(variables_ref: int, callback=None)[source]

Fetch variables for a scope or nested object.

property is_debugging: bool[source]
property debug_state: str[source]
property current_file: str[source]
property current_line: int[source]
property threads: list[dict[str, Any]][source]
property stack_frames: list[dict[str, Any]][source]
property scopes: list[dict[str, Any]][source]
property variables: dict[int, list[dict[str, Any]]][source]
on_run_file()[source]
on_run_no_debug()[source]
on_run_requested(path: str)[source]
on_toggle_breakpoint()[source]
on_step_over()[source]
on_step_into()[source]
on_step_out()[source]
on_stop_debug()[source]
on_restart_debug()[source]
process(dt: float)[source]

Tick the DAP client to poll subprocess I/O.