dap_types/events.rs
1// This file is autogenerated. Do not edit by hand.
2// To regenerate from schema, run `cargo run -p generator`.
3
4use serde::{de::DeserializeOwned, Serialize};
5use std::fmt::Debug;
6
7/// Event is an event, with associated name and body type.
8pub trait Event {
9 const EVENT: &'static str;
10 type Body: Debug + Clone + Serialize + DeserializeOwned + Send + Sync;
11}
12
13/// This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).
14/// A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).
15/// The sequence of events/requests is as follows:
16/// - adapters sends `initialized` event (after the `initialize` request has returned)
17/// - client sends zero or more `setBreakpoints` requests
18/// - client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)
19/// - client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)
20/// - client sends other future configuration requests
21/// - client sends one `configurationDone` request to indicate the end of the configuration.
22pub enum Initialized {}
23
24impl Event for Initialized {
25 const EVENT: &'static str = "initialized";
26 type Body = ();
27}
28
29/// The event indicates that the execution of the debuggee has stopped due to some condition.
30/// This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.
31pub enum Stopped {}
32
33impl Event for Stopped {
34 const EVENT: &'static str = "stopped";
35 type Body = crate::StoppedEvent;
36}
37
38/// The event indicates that the execution of the debuggee has continued.
39/// Please note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.
40/// It is only necessary to send a `continued` event if there was no previous request that implied this.
41pub enum Continued {}
42
43impl Event for Continued {
44 const EVENT: &'static str = "continued";
45 type Body = crate::ContinuedEvent;
46}
47
48/// The event indicates that the debuggee has exited and returns its exit code.
49pub enum Exited {}
50
51impl Event for Exited {
52 const EVENT: &'static str = "exited";
53 type Body = crate::ExitedEvent;
54}
55
56/// The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.
57pub enum Terminated {}
58
59impl Event for Terminated {
60 const EVENT: &'static str = "terminated";
61 type Body = crate::TerminatedEvent;
62}
63
64/// The event indicates that a thread has started or exited.
65pub enum Thread {}
66
67impl Event for Thread {
68 const EVENT: &'static str = "thread";
69 type Body = crate::ThreadEvent;
70}
71
72/// The event indicates that the target has produced some output.
73pub enum Output {}
74
75impl Event for Output {
76 const EVENT: &'static str = "output";
77 type Body = crate::OutputEvent;
78}
79
80/// The event indicates that some information about a breakpoint has changed.
81pub enum Breakpoint {}
82
83impl Event for Breakpoint {
84 const EVENT: &'static str = "breakpoint";
85 type Body = crate::BreakpointEvent;
86}
87
88/// The event indicates that some information about a module has changed.
89pub enum Module {}
90
91impl Event for Module {
92 const EVENT: &'static str = "module";
93 type Body = crate::ModuleEvent;
94}
95
96/// The event indicates that some source has been added, changed, or removed from the set of all loaded sources.
97pub enum LoadedSource {}
98
99impl Event for LoadedSource {
100 const EVENT: &'static str = "loadedSource";
101 type Body = crate::LoadedSourceEvent;
102}
103
104/// The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.
105pub enum Process {}
106
107impl Event for Process {
108 const EVENT: &'static str = "process";
109 type Body = crate::ProcessEvent;
110}
111
112/// The event indicates that one or more capabilities have changed.
113/// Since the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).
114/// Consequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.
115/// Only changed capabilities need to be included, all other capabilities keep their values.
116pub enum Capabilities {}
117
118impl Event for Capabilities {
119 const EVENT: &'static str = "capabilities";
120 type Body = crate::CapabilitiesEvent;
121}
122
123/// The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.
124/// The client is free to delay the showing of the UI in order to reduce flicker.
125/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
126pub enum ProgressStart {}
127
128impl Event for ProgressStart {
129 const EVENT: &'static str = "progressStart";
130 type Body = crate::ProgressStartEvent;
131}
132
133/// The event signals that the progress reporting needs to be updated with a new message and/or percentage.
134/// The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.
135/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
136pub enum ProgressUpdate {}
137
138impl Event for ProgressUpdate {
139 const EVENT: &'static str = "progressUpdate";
140 type Body = crate::ProgressUpdateEvent;
141}
142
143/// The event signals the end of the progress reporting with a final message.
144/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
145pub enum ProgressEnd {}
146
147impl Event for ProgressEnd {
148 const EVENT: &'static str = "progressEnd";
149 type Body = crate::ProgressEndEvent;
150}
151
152/// This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.
153/// Debug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.
154/// This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.
155pub enum Invalidated {}
156
157impl Event for Invalidated {
158 const EVENT: &'static str = "invalidated";
159 type Body = crate::InvalidatedEvent;
160}
161
162/// This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.
163/// Clients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.
164/// Debug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.
165pub enum Memory {}
166
167impl Event for Memory {
168 const EVENT: &'static str = "memory";
169 type Body = crate::MemoryEvent;
170}