From 4d425dfbad377d36e4968c1682112c5e67c4f25f Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Fri, 28 Jun 2024 16:08:50 -0700 Subject: [PATCH] feat: add returnValue as a Scope.presentationHint (#484) Closes #458 --- changelog.md | 1 + debugAdapterProtocol.json | 5 +++-- specification.md | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 6f65e1a..8e7c950 100644 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,7 @@ sectionid: changelog * 1.67.x * Add `line`, `column`, and `source` location attributions to `EvaluateArguments` + * Add `returnValue` as a well-known `Scope.presentationHint` * 1.66.x * Add `bytes` and `asAddress` properties to the `DataBreakpointInfo` request diff --git a/debugAdapterProtocol.json b/debugAdapterProtocol.json index cf091c9..c33ecb8 100644 --- a/debugAdapterProtocol.json +++ b/debugAdapterProtocol.json @@ -3545,11 +3545,12 @@ "presentationHint": { "type": "string", "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", - "_enum": [ "arguments", "locals", "registers" ], + "_enum": [ "arguments", "locals", "registers", "returnValue" ], "enumDescriptions": [ "Scope contains method arguments.", "Scope contains local variables.", - "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request.", + "Scope contains a return value. A scope of this kind should have a single child variable." ] }, "variablesReference": { diff --git a/specification.md b/specification.md index 0ac13e8..70a524c 100644 --- a/specification.md +++ b/specification.md @@ -3923,9 +3923,11 @@ interface Scope { * 'locals': Scope contains local variables. * 'registers': Scope contains registers. Only a single `registers` scope * should be returned from a `scopes` request. + * 'returnValue': Scope contains a return value. A scope of this kind should + * have a single child variable. * etc. */ - presentationHint?: 'arguments' | 'locals' | 'registers' | string; + presentationHint?: 'arguments' | 'locals' | 'registers' | 'returnValue' | string; /** * The variables of this scope can be retrieved by passing the value of