debugger: Add breakpoint list (#28496)
 Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
parent
3abf95216c
commit
26f4705198
13 changed files with 711 additions and 18 deletions
|
@ -2,7 +2,7 @@ use std::sync::Arc;
|
|||
|
||||
use anyhow::{Ok, Result, anyhow};
|
||||
use dap::{
|
||||
Capabilities, ContinueArguments, InitializeRequestArguments,
|
||||
Capabilities, ContinueArguments, ExceptionFilterOptions, InitializeRequestArguments,
|
||||
InitializeRequestArgumentsPathFormat, NextArguments, SetVariableResponse, SourceBreakpoint,
|
||||
StepInArguments, StepOutArguments, SteppingGranularity, ValueFormat, Variable,
|
||||
VariablesArgumentsFilter,
|
||||
|
@ -1665,6 +1665,44 @@ impl LocalDapCommand for SetBreakpoints {
|
|||
Ok(message.breakpoints)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, Hash, PartialEq)]
|
||||
pub(super) enum SetExceptionBreakpoints {
|
||||
Plain {
|
||||
filters: Vec<String>,
|
||||
},
|
||||
WithOptions {
|
||||
filters: Vec<ExceptionFilterOptions>,
|
||||
},
|
||||
}
|
||||
|
||||
impl LocalDapCommand for SetExceptionBreakpoints {
|
||||
type Response = Vec<dap::Breakpoint>;
|
||||
type DapRequest = dap::requests::SetExceptionBreakpoints;
|
||||
|
||||
fn to_dap(&self) -> <Self::DapRequest as dap::requests::Request>::Arguments {
|
||||
match self {
|
||||
SetExceptionBreakpoints::Plain { filters } => dap::SetExceptionBreakpointsArguments {
|
||||
filters: filters.clone(),
|
||||
exception_options: None,
|
||||
filter_options: None,
|
||||
},
|
||||
SetExceptionBreakpoints::WithOptions { filters } => {
|
||||
dap::SetExceptionBreakpointsArguments {
|
||||
filters: vec![],
|
||||
filter_options: Some(filters.clone()),
|
||||
exception_options: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn response_from_dap(
|
||||
&self,
|
||||
message: <Self::DapRequest as dap::requests::Request>::Response,
|
||||
) -> Result<Self::Response> {
|
||||
Ok(message.breakpoints.unwrap_or_default())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
|
||||
pub(super) struct LocationsCommand {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue