Skip to content

Add support for Checkpoint requests #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions _data/specification-toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@
anchor: Requests_Attach
- title: BreakpointLocations
anchor: Requests_BreakpointLocations
- title: CheckpointArguments
anchor: Requests_CheckpointArguments
- title: Completions
anchor: Requests_Completions
- title: ConfigurationDone
anchor: Requests_ConfigurationDone
- title: Continue
anchor: Requests_Continue
- title: CreateCheckpoint
anchor: Requests_CreateCheckpoint
- title: DataBreakpointInfo
anchor: Requests_DataBreakpointInfo
- title: DeleteCheckpoint
anchor: Requests_DeleteCheckpoint
- title: Disassemble
anchor: Requests_Disassemble
- title: Disconnect
Expand All @@ -83,6 +89,8 @@
anchor: Requests_Initialize
- title: Launch
anchor: Requests_Launch
- title: LoadCheckpoint
anchor: Requests_LoadCheckpoint
- title: LoadedSources
anchor: Requests_LoadedSources
- title: Modules
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ sectionid: changelog

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

* 1.61.x
* Add `supportsCheckpointRequests` capability (`createCheckpoint`, `deleteCheckpoint` and
`loadCheckpoint`).

* 1.60.x
* Clarify the usage of `hitCondition` and `logMessage` in `SetBreakpointsRequest`

Expand Down
115 changes: 115 additions & 0 deletions debugAdapterProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -3051,6 +3051,117 @@
}]
},

"CreateCheckpointRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Creates an identical copy of the process.\nClients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "createCheckpoint" ]
}
},
"required": [ "command" ]
}]
},
"CreateCheckpointResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `createCheckpoint` request.",
"properties": {
"body": {
"type": "object",
"properties": {
"checkpointId": {
"type": "integer",
"description": "The newly created checkpoint ID."
}
},
"required": [ "checkpointId" ]
}
}
}]
},
"DeleteCheckpointRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Deletes the checkpoint with the ID provided.\nClients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "deleteCheckpoint" ]
},
"arguments": {
"$ref": "#/definitions/CheckpointArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"DeleteCheckpointResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `deleteCheckpoint` request.",
"properties": {
"body": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "True if the ID of the checkpoint requested for deletion existed and was successfully deleted, False otherwise."
}
},
"required": [ "success" ]
}
}
}]
},
"LoadCheckpointRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Loads the checkpoint with the ID provided.\nClients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "loadCheckpoint" ]
},
"arguments": {
"$ref": "#/definitions/CheckpointArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"LoadCheckpointResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `loadCheckpoint` request.",
"properties": {
"body": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "True if the ID of the checkpoint requested for deletion existed and was successfully loaded, False otherwise."
}
},
"required": [ "success" ]
}
}
}]
},
"CheckpointArguments": {
"type": "object",
"description": "Arguments for `deleteCheckpoint` and `loadCheckpoint` requests.",
"properties": {
"checkpointId": {
"type": "integer",
"description": "ID of the checkpoint refered to by the request."
}
},
"required": [ "checkpointId" ]
},

"Capabilities": {
"type": "object",
"title": "Types",
Expand Down Expand Up @@ -3223,6 +3334,10 @@
"supportsSingleThreadExecutionRequests": {
"type": "boolean",
"description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)."
},
"supportsCheckpointRequests": {
"type": "boolean",
"description": "The debug adapter supports the checkpoint-type requests (`CreateCheckpointRequest`, `DeleteCheckpointRequest` and `LoadCheckpointRequest`)."
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h1 class="text-center"><i class="fa fa-cogs" aria-hidden="true"></i></h1>
<h1 class="text-center"><i class="fas fa-book" aria-hidden="true"></i></h1>
<a href='{{ "/specification" | prepend: site.baseurl }}'><h3 class="text-center">Specification</h3></a>
<p>
The latest version of the protocol specification is version 1.60.0.
The latest version of the protocol specification is version 1.61.0.
</p>
<p>
<a href='{{ "/changelog" | prepend: site.baseurl }}'>Change History</a>
Expand Down
104 changes: 104 additions & 0 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,103 @@ interface DisassembleResponse extends Response {
}
```

### <a name="Requests_CreateCheckpoint" class="anchor"></a>:leftwards_arrow_with_hook: CreateCheckpoint Request

Creates an identical copy of the process.

Clients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.

```typescript
interface CreateCheckpointRequest extends Request {
command: 'createCheckpoint';
}
```

Response to `createCheckpoint` request.

<a name="Types_CreateCheckpointResponse" class="anchor"></a>
```typescript
interface CreateCheckpointResponse extends Response {
body?: {
/**
* The newly created checkpoint ID.
*/
checkpointId: number;
};
}
```

### <a name="Requests_DeleteCheckpoint" class="anchor"></a>:leftwards_arrow_with_hook: DeleteCheckpoint Request

Deletes the checkpoint with the ID provided.

Clients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.

```typescript
interface DeleteCheckpointRequest extends Request {
command: 'deleteCheckpoint';

arguments: CheckpointArguments;
}
```

Response to `deleteCheckpoint` request.

<a name="Types_DeleteCheckpointResponse" class="anchor"></a>
```typescript
interface DeleteCheckpointResponse extends Response {
body?: {
/**
* True if the ID of the checkpoint requested for deletion existed and was
* successfully deleted, False otherwise.
*/
success: boolean;
};
}
```

### <a name="Requests_LoadCheckpoint" class="anchor"></a>:leftwards_arrow_with_hook: LoadCheckpoint Request

Loads the checkpoint with the ID provided.

Clients should only call this request if the corresponding capability `supportsCheckpointRequests` is true.

```typescript
interface LoadCheckpointRequest extends Request {
command: 'loadCheckpoint';

arguments: CheckpointArguments;
}
```

Response to `loadCheckpoint` request.

<a name="Types_LoadCheckpointResponse" class="anchor"></a>
```typescript
interface LoadCheckpointResponse extends Response {
body?: {
/**
* True if the ID of the checkpoint requested for deletion existed and was
* successfully loaded, False otherwise.
*/
success: boolean;
};
}
```

### <a name="Requests_CheckpointArguments" class="anchor"></a>CheckpointArguments

Arguments for `deleteCheckpoint` and `loadCheckpoint` requests.

```typescript
interface CheckpointArguments {
/**
* ID of the checkpoint refered to by the request.
*/
checkpointId: number;
}
```

## <a name="Types" class="anchor"></a>Types

### <a name="Types_Capabilities" class="anchor"></a>Capabilities
Expand Down Expand Up @@ -3439,6 +3536,13 @@ interface Capabilities {
* `stepBack`).
*/
supportsSingleThreadExecutionRequests?: boolean;

/**
* The debug adapter supports the checkpoint-type requests
* (`CreateCheckpointRequest`, `DeleteCheckpointRequest` and
* `LoadCheckpointRequest`).
*/
supportsCheckpointRequests?: boolean;
}
```

Expand Down