dap.wit

 1interface dap {
 2    use common.{env-vars};
 3    record launch-request {
 4        program: string,
 5        cwd: option<string>,
 6        args: list<string>,
 7        envs: env-vars,
 8    }
 9
10    record attach-request {
11        process-id: option<u32>,
12    }
13
14    variant debug-request {
15        launch(launch-request),
16        attach(attach-request)
17    }
18
19    record tcp-arguments {
20        port: u16,
21        host: u32,
22        timeout: option<u64>,
23    }
24
25    record tcp-arguments-template {
26        port: option<u16>,
27        host: option<u32>,
28        timeout: option<u64>,
29    }
30    record debug-task-definition {
31        label: string,
32        adapter: string,
33        request: debug-request,
34        initialize-args: option<string>,
35        stop-on-entry: option<bool>,
36        tcp-connection: option<tcp-arguments-template>,
37    }
38
39    enum start-debugging-request-arguments-request {
40        launch,
41        attach,
42    }
43    record start-debugging-request-arguments {
44        configuration: string,
45        request: start-debugging-request-arguments-request,
46
47    }
48    record debug-adapter-binary {
49        command: string,
50        arguments: list<string>,
51        envs: env-vars,
52        cwd: option<string>,
53        connection: option<tcp-arguments>,
54        request-args: start-debugging-request-arguments
55    }
56}