Skip to content

Commit

Permalink
add guidance for setExpression; fixes #188
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed May 27, 2021
1 parent aae5606 commit e7c1c85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sectionid: changelog

#### All notable changes to the specification will be documented in this file.

* 1.48.x:
* Add guidance for the case that a debug adapter implements both `setVariable` and `setExpression` and clients need to decide which request to use.

* 1.47.x:
* The `setExceptionBreakpoints` can now optionally return an array of `Breakpoint`s as the other `setXxxxBreakpoints` do. This allows clients to show validation error messages for individual exception breakpoints or filters.
* The `restart` request got a new optional parameter `arguments` where a client can pass the latest version of a launch or attach configuration.
Expand Down
4 changes: 2 additions & 2 deletions debugAdapterProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@
"SetVariableRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.",
"description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.\nIf a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.",
"properties": {
"command": {
"type": "string",
Expand Down Expand Up @@ -2412,7 +2412,7 @@
"SetExpressionRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.",
"description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.\nIf a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.",
"properties": {
"command": {
"type": "string",
Expand Down
4 changes: 4 additions & 0 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,8 @@ interface VariablesResponse extends Response {

Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.

If a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.

```typescript
interface SetVariableRequest extends Request {
command: 'setVariable';
Expand Down Expand Up @@ -2526,6 +2528,8 @@ The expressions have access to any variables and arguments that are in scope of

Clients should only call this request if the capability 'supportsSetExpression' is true.

If a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.

```typescript
interface SetExpressionRequest extends Request {
command: 'setExpression';
Expand Down

0 comments on commit e7c1c85

Please sign in to comment.