lib.rs

 1pub mod adapters;
 2pub mod client;
 3pub mod debugger_settings;
 4pub mod proto_conversions;
 5pub mod transport;
 6
 7pub use dap_types::*;
 8pub use task::{DebugAdapterConfig, DebugAdapterKind, DebugRequestType};
 9
10pub type ScopeId = u64;
11pub type VariableReference = u64;
12pub type StackFrameId = u64;
13
14#[cfg(any(test, feature = "test-support"))]
15pub use adapters::FakeAdapter;
16
17#[cfg(any(test, feature = "test-support"))]
18pub fn test_config(
19    request: DebugRequestType,
20    fail: Option<bool>,
21    caps: Option<Capabilities>,
22) -> DebugAdapterConfig {
23    DebugAdapterConfig {
24        label: "test config".into(),
25        kind: DebugAdapterKind::Fake((
26            fail.unwrap_or_default(),
27            caps.unwrap_or(Capabilities {
28                supports_step_back: Some(false),
29                ..Default::default()
30            }),
31        )),
32        request,
33        program: None,
34        supports_attach: false,
35        cwd: None,
36        initialize_args: None,
37    }
38}