Expand description
§dscode-dap
Debug Adapter Protocol client, manager, and pool for DSCode.
This crate provides a complete DAP client implementation with:
DebugAdapter— State-machine-based DAP client that manages a debug adapter processDebugManager— Registry for debug sessions and breakpointsDebugAdapterPool— Connection pool with one adapter per debug session
§State Machine
The DebugAdapter follows a strict lifecycle:
Stopped → Starting → Initializing → Configured → Running
▲ │ │ │ │
│ ▼ ▼ ▼ ▼
│ Crashed ◄── Crashed ◄─── Crashed ◄── Crashed
│ │
│ ShuttingDown│
│ │ │
└───────────────────────────────────────────┘ │
▲ │
└───────┘§Example
use dscode_dap::{DebugAdapterPool, DebugManager, DebugSession, DebugState};
let manager = DebugManager::new();
let session_id = manager.create_session("main".to_string(), "cppdbg".to_string()).unwrap();
let pool = DebugAdapterPool::new();
pool.register_adapter("cppdbg".to_string(), "/usr/bin/gdb".to_string(), vec![]).await;
let session = manager.get_session(&session_id).unwrap();
let adapter = pool.create_session(session).await.unwrap();Structs§
- Breakpoint
- Debug
Adapter - A state-machine-based DAP client that manages a debug adapter process.
- Debug
Adapter Pool - Pool for managing multiple debug adapters
- Debug
Manager - Debug
Pool Stats - Debug
Session - Launch
Request Arguments - Scope
- Source
- Source
Breakpoint - Stack
Frame - Thread
- Variable
Enums§
- DapError
- Errors that can occur in Debug Adapter Protocol operations.
- Debug
Adapter State - State machine for the DAP debug adapter lifecycle.
- Debug
State