pub trait DebugService:
Environment
+ Send
+ Sync {
// Required methods
fn RegisterDebugConfigurationProvider<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
ProviderHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn RegisterDebugAdapterDescriptorFactory<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
FactoryHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn StartDebugging<'life0, 'async_trait>(
&'life0 self,
FolderURI: Option<Url>,
Configuration: Value,
) -> Pin<Box<dyn Future<Output = Result<String, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn SendCommand<'life0, 'async_trait>(
&'life0 self,
SessionID: String,
Command: String,
Arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An abstract service contract for an environment component that can manage the entire debug lifecycle, from configuration resolution to session control.
Required Methods§
Sourcefn RegisterDebugConfigurationProvider<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
ProviderHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn RegisterDebugConfigurationProvider<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
ProviderHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Registers a provider for resolving debug configurations from an extension.
§Parameters
DebugType: The type of debugger this provider is for (e.g., “node”).ProviderHandle: A unique handle assigned by the extension host for this provider.SideCarIdentifier: The identifier of the sidecar (e.g., “cocoon-main”) hosting the provider.
Sourcefn RegisterDebugAdapterDescriptorFactory<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
FactoryHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn RegisterDebugAdapterDescriptorFactory<'life0, 'async_trait>(
&'life0 self,
DebugType: String,
FactoryHandle: u32,
SideCarIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Registers a factory for creating debug adapter descriptors from an extension.
§Parameters
DebugType: The type of debugger this factory is for.FactoryHandle: A unique handle assigned by the extension host for this factory.SideCarIdentifier: The identifier of the sidecar hosting the factory.
Sourcefn StartDebugging<'life0, 'async_trait>(
&'life0 self,
FolderURI: Option<Url>,
Configuration: Value,
) -> Pin<Box<dyn Future<Output = Result<String, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn StartDebugging<'life0, 'async_trait>(
&'life0 self,
FolderURI: Option<Url>,
Configuration: Value,
) -> Pin<Box<dyn Future<Output = Result<String, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn SendCommand<'life0, 'async_trait>(
&'life0 self,
SessionID: String,
Command: String,
Arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn SendCommand<'life0, 'async_trait>(
&'life0 self,
SessionID: String,
Command: String,
Arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a command to a running debug session. This corresponds to the Debug Adapter Protocol (DAP).
§Parameters
SessionID: The unique ID of the target debug session.Command: The DAP command to send (e.g., “continue”, “stepOver”).Arguments: A JSON value containing the arguments for the command.
§Returns
A Result containing the JSON response from the debug adapter.