Skip to content

Commit f00c30f

Browse files
committed
feat: add instruction reference to GotoTargets request
1 parent c586d88 commit f00c30f

3 files changed

Lines changed: 43 additions & 3 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sectionid: changelog
1010
* Clarify how `StackTraceArguments.format` applies
1111
* Clarify the default behavior of `ContinuedEvent.allThreadsContinued`
1212
* Clarify representation of breakpoints after a `changed` event
13+
* Add optional `instructionReference` and `offset` properties to the `gotoTargets` request
1314

1415
* 1.69.x
1516
* Clarify the flow diagram to start a debug session

debugAdapterProtocol.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,6 +2767,14 @@
27672767
"column": {
27682768
"type": "integer",
27692769
"description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based."
2770+
},
2771+
"instructionReference": {
2772+
"type": "string",
2773+
"description": "The instruction reference for which the goto targets are determined.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. Clients may set this property only if the `supportsGotoInstructionTargets ` is true. If `instructionReference` is set, the debug adapter should ignore the `line`, `column`, and `source` on the request and clients may set them to zero or empty values."
2774+
},
2775+
"offset": {
2776+
"type": "integer",
2777+
"description": "The offset from the instruction reference in bytes.\nThis can be negative. This may only be provided when an `instructionReference` is included in the request."
27702778
}
27712779
},
27722780
"required": [ "source", "line" ]
@@ -3352,6 +3360,10 @@
33523360
"supportsANSIStyling": {
33533361
"type": "boolean",
33543362
"description": "The debug adapter supports ANSI escape sequences in styling of `OutputEvent.output` and `Variable.value` fields."
3363+
},
3364+
"supportsGotoInstructionTargets": {
3365+
"type": "boolean",
3366+
"description": "The debug adapter supports the `instructionReference` and `offset` fields in the `gotoTargets` request."
33553367
}
33563368
}
33573369
},

specification.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ interface OutputEvent extends Event {
491491

492492
### <a name="Events_Breakpoint" class="anchor"></a>:arrow_left: Breakpoint Event
493493

494-
The event indicates that some information about a breakpoint has changed.
494+
The event indicates that some information about a breakpoint has changed. While debug adapters may notify the clients of `changed` breakpoints using this event, clients should continue to use the breakpoint's original properties when updating a source's breakpoints in the `breakpoint` request.
495495

496496
```typescript
497497
interface BreakpointEvent extends Event {
@@ -3023,6 +3023,24 @@ interface GotoTargetsArguments {
30233023
* determines whether it is 0- or 1-based.
30243024
*/
30253025
column?: number;
3026+
3027+
/**
3028+
* The instruction reference for which the goto targets are determined.
3029+
* This should be a memory or instruction pointer reference from an
3030+
* `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or
3031+
* `Breakpoint`. Clients may set this property only if the
3032+
* `supportsGotoInstructionTargets ` is true. If `instructionReference` is
3033+
* set, the debug adapter should ignore the `line`, `column`, and `source` on
3034+
* the request and clients may set them to zero or empty values.
3035+
*/
3036+
instructionReference?: string;
3037+
3038+
/**
3039+
* The offset from the instruction reference in bytes.
3040+
* This can be negative. This may only be provided when an
3041+
* `instructionReference` is included in the request.
3042+
*/
3043+
offset?: number;
30263044
}
30273045
```
30283046

@@ -3501,8 +3519,11 @@ interface Capabilities {
35013519
supportsCompletionsRequest?: boolean;
35023520

35033521
/**
3504-
* The set of characters that should trigger completion in a REPL. If not
3505-
* specified, the UI should assume the `.` character.
3522+
* The set of characters that should automatically trigger a completion
3523+
* request in a REPL. If not specified, the client should assume the `.`
3524+
* character. The client may trigger additional completion requests on
3525+
* characters such as ones that make up common identifiers, or as otherwise
3526+
* requested by a user.
35063527
*/
35073528
completionTriggerCharacters?: string[];
35083529

@@ -3672,6 +3693,12 @@ interface Capabilities {
36723693
* `OutputEvent.output` and `Variable.value` fields.
36733694
*/
36743695
supportsANSIStyling?: boolean;
3696+
3697+
/**
3698+
* The debug adapter supports the `instructionReference` and `offset` fields
3699+
* in the `gotoTargets` request.
3700+
*/
3701+
supportsGotoInstructionTargets?: boolean;
36753702
}
36763703
```
36773704

0 commit comments

Comments
 (0)