Skip to main content

DebugService

Trait DebugService 

Source
pub trait DebugService:
    Send
    + Sync
    + Debug {
    // Required methods
    fn start<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        session: &'life1 str,
        command: &'life2 str,
        args: &'life3 Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn terminate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Debug service contract (“Debug service” extension): a real DAP session lifecycle (design table row 5).

Requests use DAP command names (setBreakpoints, continue, next, variables, …) with raw JSON payloads — typed methods arrive with the first real implementation.

Required Methods§

Source

fn start<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Launch or attach a session per the DAP launch/attach config; returns a session id.

Source

fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session: &'life1 str, command: &'life2 str, args: &'life3 Value, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Issue a DAP request against the session; returns the raw response payload.

Source

fn terminate<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Terminate the session and clean up the adapter process.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§