Skip to content

Commit c1e87e7

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

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

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 `supportsGotoInstruction` is true."
2774+
},
2775+
"offset": {
2776+
"type": "integer",
2777+
"description": "The offset from the instruction reference in bytes.\nThis can be negative. Clients may set this property only if the `supportsGotoInstruction` is true."
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+
"supportsGotoInstruction": {
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: 28 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,22 @@ 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+
* `supportsGotoInstruction` is true.
3033+
*/
3034+
instructionReference?: string;
3035+
3036+
/**
3037+
* The offset from the instruction reference in bytes.
3038+
* This can be negative. Clients may set this property only if the
3039+
* `supportsGotoInstruction` is true.
3040+
*/
3041+
offset?: number;
30263042
}
30273043
```
30283044

@@ -3501,8 +3517,11 @@ interface Capabilities {
35013517
supportsCompletionsRequest?: boolean;
35023518

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

@@ -3672,6 +3691,12 @@ interface Capabilities {
36723691
* `OutputEvent.output` and `Variable.value` fields.
36733692
*/
36743693
supportsANSIStyling?: boolean;
3694+
3695+
/**
3696+
* The debug adapter supports the `instructionReference` and `offset` fields
3697+
* in the `gotoTargets` request.
3698+
*/
3699+
supportsGotoInstruction?: boolean;
36753700
}
36763701
```
36773702

0 commit comments

Comments
 (0)