Skip to content

Commit

Permalink
DAP v1.65 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Soarex16 authored and jonahgraham committed Apr 14, 2024
1 parent 53bcd87 commit 8fb07f4
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,15 @@ class DataBreakpointInfoArguments {
* Since 1.59
*/
int frameId;
/**
* The mode of the desired breakpoint. If defined, this must be one of the `breakpointModes`
* the debug adapter advertised in its `Capabilities`.
* <p>
* This is an optional property.
* <p>
* Since 1.65
*/
String mode;
}

/**
Expand Down Expand Up @@ -2698,6 +2707,75 @@ class Capabilities {
* Since 1.51
*/
Boolean supportsSingleThreadExecutionRequests;
/**
* Modes of breakpoints supported by the debug adapter, such as 'hardware' or 'software'.
* If present, the client may allow the user to select a mode and include it in its `setBreakpoints` request.
* <p>
* <p>
* Clients may present the first applicable mode in this array as the 'default' mode in gestures that set breakpoints.
* <p>
* This is an optional property.
* <p>
* Possible values include - but not limited to those defined in {@link BreakpointMode}
* <p>
* Since 1.65
*/
BreakpointMode[] breakpointModes;
}

/**
* A `BreakpointMode` is provided as a option when setting breakpoints on sources or instructions.
* <p>
* Since 1.65
*/
class BreakpointMode {
/**
* The internal ID of the mode. This value is passed to the `setBreakpoints` request.
*/
@NonNull
String mode;
/**
* The name of the breakpoint mode. This is shown in the UI.
*/
@NonNull
String label;
/**
* A help text providing additional information about the breakpoint mode.
* This string is typically shown as a hover and can be translated.
* <p>
* This is an optional property.
*/
String description;
/**
* Describes one or more type of breakpoint this mode applies to.
*/
@NonNull
String[] appliesTo;
}

/**
* Describes one or more type of breakpoint a `BreakpointMode` applies to.
* This is a non-exhaustive enumeration and may expand as future breakpoint types are added.
* <p>
* Since 1.65
*/
interface BreakpointModeApplicability {
/**
* In `SourceBreakpoint`s
*/
public static final String SOURCE = "source";
/**
* In exception breakpoints applied in the `ExceptionFilterOptions`
*/
public static final String EXCEPTION = "exception";
/**
* In data breakpoints requested in the `DataBreakpointInfo` request
*/
public static final String DATA = "data";
/**
* In `InstructionBreakpoint`s
*/
public static final String INSTRUCTION = "instruction";
}

/**
Expand Down Expand Up @@ -3583,6 +3661,15 @@ class SourceBreakpoint {
* This is an optional property.
*/
String logMessage;
/**
* The mode of this breakpoint. If defined, this must be one of the `breakpointModes`
* the debug adapter advertised in its `Capabilities`.
* <p>
* This is an optional property.
* <p>
* Since 1.65
*/
String mode;
}

/**
Expand Down Expand Up @@ -3699,6 +3786,15 @@ class InstructionBreakpoint {
* This is an optional property.
*/
String hitCondition;
/**
* The mode of this breakpoint. If defined, this must be one of the `breakpointModes`
* the debug adapter advertised in its `Capabilities`.
* <p>
* This is an optional property.
* <p>
* Since 1.65
*/
String mode;
}

/**
Expand Down Expand Up @@ -4147,6 +4243,16 @@ class ExceptionFilterOptions {
* This is an optional property.
*/
String condition;

/**
* The mode of this exception breakpoint. If defined, this must be one of the `breakpointModes`
* the debug adapter advertised in its `Capabilities`.
* <p>
* This is an optional property.
* <p>
* Since 1.65
*/
String mode;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ default CompletableFuture<SetFunctionBreakpointsResponse> setFunctionBreakpoints

/**
* The request configures the debugger's response to thrown exceptions.
* <p>
* If an exception is configured to break, a 'stopped' event is fired (with
* reason 'exception').
* Each of the `filters`, `filterOptions`, and `exceptionOptions` in the request are independent
* configurations to a debug adapter indicating a kind of exception to catch.
* An exception thrown in a program should result in a `stopped` event from the debug adapter
* (with reason `exception`) if any of the configured filters match.
* <p>
* Clients should only call this request if the corresponding capability
* {@link Capabilities#getExceptionBreakpointFilters} returns one or more filters.
Expand Down

0 comments on commit 8fb07f4

Please sign in to comment.