Skip to content

Commit 3168bbc

Browse files
committed
add a 'breakpointLocations' request
1 parent 78612af commit 3168bbc

File tree

5 files changed

+194
-1
lines changed

5 files changed

+194
-1
lines changed

_data/specification-toc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
children:
4848
- title: Attach
4949
anchor: Requests_Attach
50+
- title: BreakpointLocations
51+
anchor: Requests_BreakpointLocations
5052
- title: Completions
5153
anchor: Requests_Completions
5254
- title: ConfigurationDone
@@ -131,6 +133,8 @@
131133
children:
132134
- title: Breakpoint
133135
anchor: Types_Breakpoint
136+
- title: BreakpointLocation
137+
anchor: Types_BreakpointLocation
134138
- title: Capabilities
135139
anchor: Types_Capabilities
136140
- title: Checksum

changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ sectionid: changelog
77
#### All notable changes to the specification will be documented in this file.
88

99
* 1.37.x:
10+
* Adds a `breakpointLocations` request (and a corresponding `supportsBreakpointLocationsRequest` capability) for finding the possible breakpoints for a source range.
1011
* Adds cancellation support for requests via a new `cancel` request and a corresponding `supportsCancelRequest` capability.
1112
* Improves some comments.
1213

debugAdapterProtocol.json

+95
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,73 @@
884884
}]
885885
},
886886

887+
"BreakpointLocationsRequest": {
888+
"allOf": [ { "$ref": "#/definitions/Request" }, {
889+
"type": "object",
890+
"description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.",
891+
"properties": {
892+
"command": {
893+
"type": "string",
894+
"enum": [ "breakpointLocations" ]
895+
},
896+
"arguments": {
897+
"$ref": "#/definitions/BreakpointLocationsArguments"
898+
}
899+
},
900+
"required": [ "command" ]
901+
}]
902+
903+
},
904+
"BreakpointLocationsArguments": {
905+
"type": "object",
906+
"description": "Arguments for 'breakpointLocations' request.",
907+
"properties": {
908+
"source": {
909+
"$ref": "#/definitions/Source",
910+
"description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified."
911+
},
912+
"line": {
913+
"type": "integer",
914+
"description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line."
915+
},
916+
"column": {
917+
"type": "integer",
918+
"description": "Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed."
919+
},
920+
"endLine": {
921+
"type": "integer",
922+
"description": "Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line."
923+
},
924+
"endColumn": {
925+
"type": "integer",
926+
"description": "Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line."
927+
}
928+
},
929+
"required": [ "source", "line" ]
930+
},
931+
"BreakpointLocationsResponse": {
932+
"allOf": [ { "$ref": "#/definitions/Response" }, {
933+
"type": "object",
934+
"description": "Response to 'breakpointLocations' request.\nContains possible locations for source breakpoints.",
935+
"properties": {
936+
"body": {
937+
"type": "object",
938+
"properties": {
939+
"breakpoints": {
940+
"type": "array",
941+
"items": {
942+
"$ref": "#/definitions/BreakpointLocation"
943+
},
944+
"description": "Sorted set of possible breakpoint locations."
945+
}
946+
},
947+
"required": [ "breakpoints" ]
948+
}
949+
},
950+
"required": [ "body" ]
951+
}]
952+
},
953+
887954
"SetBreakpointsRequest": {
888955
"allOf": [ { "$ref": "#/definitions/Request" }, {
889956
"type": "object",
@@ -2643,6 +2710,10 @@
26432710
"supportsCancelRequest": {
26442711
"type": "boolean",
26452712
"description": "The debug adapter supports the 'cancel' request."
2713+
},
2714+
"supportsBreakpointLocationsRequest": {
2715+
"type": "boolean",
2716+
"description": "The debug adapter supports the 'breakpointLocations' request."
26462717
}
26472718
}
26482719
},
@@ -3058,6 +3129,30 @@
30583129
}
30593130
},
30603131

3132+
"BreakpointLocation": {
3133+
"type": "object",
3134+
"description": "Properties of a breakpoint location returned from the 'breakpointLocations' request.",
3135+
"properties": {
3136+
"line": {
3137+
"type": "integer",
3138+
"description": "Start line of breakpoint location."
3139+
},
3140+
"column": {
3141+
"type": "integer",
3142+
"description": "Optional start column of breakpoint location."
3143+
},
3144+
"endLine": {
3145+
"type": "integer",
3146+
"description": "Optional end line of breakpoint location if the location covers a range."
3147+
},
3148+
"endColumn": {
3149+
"type": "integer",
3150+
"description": "Optional end column of breakpoint location if the location covers a range."
3151+
}
3152+
},
3153+
"required": [ "line" ]
3154+
},
3155+
30613156
"SourceBreakpoint": {
30623157
"type": "object",
30633158
"description": "Properties of a breakpoint or logpoint passed to the setBreakpoints request.",

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ <h1 class="text-center"><i class="fa fa-cogs" aria-hidden="true"></i></h1>
8686
<h1 class="text-center"><i class="fas fa-book" aria-hidden="true"></i></h1>
8787
<a href='{{ "/specification" | prepend: site.baseurl }}'><h3 class="text-center">Specification</h3></a>
8888
<p>
89-
The latest version of the protocol specification is version 1.36.
89+
The latest version of the protocol specification is version 1.37.
9090
</p>
9191
<p>
9292
<a href='{{ "/changelog" | prepend: site.baseurl }}'>Change History</a>

specification.md

+93
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,66 @@ interface TerminateResponse extends Response {
870870
}
871871
```
872872

873+
### <a name="Requests_BreakpointLocations" class="anchor"></a>:leftwards_arrow_with_hook: BreakpointLocations Request
874+
875+
The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.
876+
877+
```typescript
878+
interface BreakpointLocationsRequest extends Request {
879+
command: 'breakpointLocations';
880+
881+
arguments?: BreakpointLocationsArguments;
882+
}
883+
```
884+
885+
Arguments for 'breakpointLocations' request.
886+
887+
<a name="Types_BreakpointLocationsArguments" class="anchor"></a>
888+
```typescript
889+
interface BreakpointLocationsArguments {
890+
/**
891+
* The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
892+
*/
893+
source: Source;
894+
895+
/**
896+
* Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
897+
*/
898+
line: number;
899+
900+
/**
901+
* Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed.
902+
*/
903+
column?: number;
904+
905+
/**
906+
* Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.
907+
*/
908+
endLine?: number;
909+
910+
/**
911+
* Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line.
912+
*/
913+
endColumn?: number;
914+
}
915+
```
916+
917+
Response to 'breakpointLocations' request.
918+
919+
Contains possible locations for source breakpoints.
920+
921+
<a name="Types_BreakpointLocationsResponse" class="anchor"></a>
922+
```typescript
923+
interface BreakpointLocationsResponse extends Response {
924+
body: {
925+
/**
926+
* Sorted set of possible breakpoint locations.
927+
*/
928+
breakpoints: BreakpointLocation[];
929+
};
930+
}
931+
```
932+
873933
### <a name="Requests_SetBreakpoints" class="anchor"></a>:leftwards_arrow_with_hook: SetBreakpoints Request
874934

875935
Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
@@ -2520,6 +2580,11 @@ interface Capabilities {
25202580
* The debug adapter supports the 'cancel' request.
25212581
*/
25222582
supportsCancelRequest?: boolean;
2583+
2584+
/**
2585+
* The debug adapter supports the 'breakpointLocations' request.
2586+
*/
2587+
supportsBreakpointLocationsRequest?: boolean;
25232588
}
25242589
```
25252590

@@ -3017,6 +3082,34 @@ interface VariablePresentationHint {
30173082
}
30183083
```
30193084

3085+
### <a name="Types_BreakpointLocation" class="anchor"></a>BreakpointLocation
3086+
3087+
Properties of a breakpoint location returned from the 'breakpointLocations' request.
3088+
3089+
```typescript
3090+
interface BreakpointLocation {
3091+
/**
3092+
* Start line of breakpoint location.
3093+
*/
3094+
line: number;
3095+
3096+
/**
3097+
* Optional start column of breakpoint location.
3098+
*/
3099+
column?: number;
3100+
3101+
/**
3102+
* Optional end line of breakpoint location if the location covers a range.
3103+
*/
3104+
endLine?: number;
3105+
3106+
/**
3107+
* Optional end column of breakpoint location if the location covers a range.
3108+
*/
3109+
endColumn?: number;
3110+
}
3111+
```
3112+
30203113
### <a name="Types_SourceBreakpoint" class="anchor"></a>SourceBreakpoint
30213114

30223115
Properties of a breakpoint or logpoint passed to the setBreakpoints request.

0 commit comments

Comments
 (0)