Skip to content

Commit

Permalink
first cut of open-external-request
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Feb 12, 2019
1 parent 80ecba4 commit ac0289e
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 5 deletions.
2 changes: 2 additions & 0 deletions _data/specification-toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
- title: Reverse Requests
anchor: Reverse_Requests
children:
- title: OpenExternal
anchor: Reverse_Requests_OpenExternal
- title: RunInTerminal
anchor: Reverse_Requests_RunInTerminal
- title: Types
Expand Down
38 changes: 38 additions & 0 deletions debugAdapterProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,40 @@
}]
},

"OpenExternalRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "This request is sent from the debug adapter to the client to open a url in an external program, e.g. a http(s) or mailto-link, using the default application.",
"properties": {
"command": {
"type": "string",
"enum": [ "openExternal" ]
},
"arguments": {
"$ref": "#/definitions/OpenExternalArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"OpenExternalArguments": {
"type": "object",
"description": "Arguments for 'openExternal' request.",
"properties": {
"url": {
"type": "string",
"description": "The uri that should be opened."
}
},
"required": [ "url" ]
},
"OpenExternalResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'openExternal' request. This is just an acknowledgement, so no body field is required."
}]
},

"InitializeRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
Expand Down Expand Up @@ -627,6 +661,10 @@
"supportsRunInTerminalRequest": {
"type": "boolean",
"description": "Client supports the runInTerminal request."
},
"supportsOpenExternalRequest": {
"type": "boolean",
"description": "Client supports the openExternal request."
}
},
"required": [ "adapterID" ]
Expand Down
47 changes: 42 additions & 5 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ interface StoppedEvent extends Event {
/**
* The reason for the event.
* For backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).
* Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', etc.
* Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', 'function breakpoint', etc.
*/
reason: string;

Expand Down Expand Up @@ -515,6 +515,38 @@ interface RunInTerminalResponse extends Response {
}
```

### <a name="Reverse_Requests_OpenExternal" class="anchor"></a>:leftwards_arrow_with_hook: OpenExternal Request

This request is sent from the debug adapter to the client to open a url in an external program, e.g. a http(s) or mailto-link, using the default application.

```typescript
interface OpenExternalRequest extends Request {
command: 'openExternal';

arguments: OpenExternalArguments;
}
```

Arguments for 'openExternal' request.

<a name="Types_OpenExternalArguments" class="anchor"></a>
```typescript
interface OpenExternalArguments {
/**
* The uri that should be opened.
*/
url: string;
}
```

Response to 'openExternal' request. This is just an acknowledgement, so no body field is required.

<a name="Types_OpenExternalResponse" class="anchor"></a>
```typescript
interface OpenExternalResponse extends Response {
}
```

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

### <a name="Requests_Initialize" class="anchor"></a>:leftwards_arrow_with_hook: Initialize Request
Expand Down Expand Up @@ -588,6 +620,11 @@ interface InitializeRequestArguments {
* Client supports the runInTerminal request.
*/
supportsRunInTerminalRequest?: boolean;

/**
* Client supports the openExternal request.
*/
supportsOpenExternalRequest?: boolean;
}
```

Expand Down Expand Up @@ -876,11 +913,11 @@ interface SetBreakpointsResponse extends Response {

### <a name="Requests_SetFunctionBreakpoints" class="anchor"></a>:leftwards_arrow_with_hook: SetFunctionBreakpoints Request

Sets multiple function breakpoints and clears all previous function breakpoints.
Replaces all existing function breakpoints with new function breakpoints.

To clear all function breakpoint, specify an empty array.
To clear all function breakpoints, specify an empty array.

When a function breakpoint is hit, a 'stopped' event (event type 'function breakpoint') is generated.
When a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.

```typescript
interface SetFunctionBreakpointsRequest extends Request {
Expand Down Expand Up @@ -1465,7 +1502,7 @@ interface SetVariableArguments {
variablesReference: number;

/**
* The name of the variable.
* The name of the variable in the container.
*/
name: string;

Expand Down

0 comments on commit ac0289e

Please sign in to comment.