1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Debug Adapter Protocol (DAP) implementation for mq.
//!
//! This crate provides a DAP server for debugging mq scripts, enabling integration
//! with IDEs and editors that support the Debug Adapter Protocol.
//!
//! # Features
//!
//! - Full DAP protocol support for mq debugging
//! - Breakpoint management
//! - Step-through execution (step in, step out, step over)
//! - Variable inspection
//! - Stack trace visualization
//! - Expression evaluation in debug context
//!
//! # Usage
//!
//! The DAP server can be started programmatically or as part of an editor integration:
//!
//! ```rust,ignore
//! use mq_dap::start;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! start().await?;
//! Ok(())
//! }
//! ```
//!
//! # Protocol Support
//!
//! This implementation supports the Debug Adapter Protocol as specified by Microsoft.
//! The server communicates over stdin/stdout using JSON-RPC messages.
//!
//! # Integration
//!
//! This DAP implementation is designed to work with:
//! - Visual Studio Code
//! - Neovim with DAP support
//! - Other editors supporting the Debug Adapter Protocol
//!
//! # Architecture
//!
//! The crate is organized into:
//! - `adapter`: DAP adapter implementation
//! - `protocol`: DAP message types and protocol handling
//! - `executor`: Debug execution engine
//! - `handler`: Request and event handlers
//! - `server`: DAP server implementation
pub use start;