You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: debugAdapterProtocol.json
+9-1
Original file line number
Diff line number
Diff line change
@@ -734,7 +734,7 @@
734
734
"allOf": [ { "$ref": "#/definitions/Request" }, {
735
735
"type": "object",
736
736
"title": "Reverse Requests",
737
-
"description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding capability `supportsRunInTerminalRequest` is true.",
737
+
"description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.",
738
738
"properties": {
739
739
"command": {
740
740
"type": "string",
@@ -778,6 +778,10 @@
778
778
"type": [ "string", "null" ],
779
779
"description": "Proper values must be strings. A value of `null` removes the variable from the environment."
780
780
}
781
+
},
782
+
"argsCanBeInterpretedByShell": {
783
+
"type": "boolean",
784
+
"description": "This property should only be set if the client has passed the value true for the 'supportsArgsCanBeInterpretedByShell' capability of the 'initialize' request. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells."
781
785
}
782
786
},
783
787
"required": [ "args", "cwd" ]
@@ -882,6 +886,10 @@
882
886
"supportsMemoryEvent": {
883
887
"type": "boolean",
884
888
"description": "Client supports the memory event."
889
+
},
890
+
"supportsArgsCanBeInterpretedByShell": {
891
+
"type": "boolean",
892
+
"description": "Client supports the 'argsCanBeInterpretedByShell' attribute on the 'runInTerminal' request."
Copy file name to clipboardExpand all lines: overview.md
+2-5
Original file line number
Diff line number
Diff line change
@@ -130,11 +130,8 @@ It is not necessary to return an explicit `false` for unsupported capabilities.
130
130
After the debug adapter has been initialized, it is ready to accept requests for starting debugging.
131
131
Two requests exist for this:
132
132
-[**launch**](./specification#Requests_Launch) request: the debug adapter launches the program ("debuggee") in debug mode and then starts to communicate with it.
133
-
Since the debug adapter is responsible for the debuggee, it should provide options for the end user to interact with the debuggee.
134
-
Basically there are three options how the debuggee can be launched. Two of the options are available to the debug adapter via the [**RunInTerminal**](./specification#Reverse_Requests_RunInTerminal) request.
135
-
- the **_debug console_**: this is an interactive REPL environment which allows the user to evaluate expressions in the context of the debuggee. Program output shows up in the debug console too, but the program cannot read input through it (because of the REPL functionality).
136
-
- an **_integrated terminal_**: this is a terminal emulator integrated in the development tool. It supports the usual terminal control codes and supports reading program input.
137
-
- in an **_external terminal_**: similar to the integrated terminal, but the terminal runs outside of the development tool.
133
+
Since the debug adapter is responsible for launching the debuggee, it should provide a mechanism for the end user to configure the debuggee. For example, passing arguments or specifying a working directory.
134
+
- Debug adapters are free to launch the debuggee however they choose. Typically the debuggee is launched as a child process and its output channels are connected to a client's debug console via [**output**](./specification.md#Events_Output) events. However, this has certain limitations, such as not being able to write to the terminal device directly and not being able to accept standard input. For those cases, launching the debuggee in a terminal is preferable. A debug adapter can use the the [**runInTerminal**](./specification#Reverse_Requests_RunInTerminal) request to ask the client to launch the debuggee in a terminal that is integrated into the client or in a terminal that runs outside of the client (but still configured and managed from the client).
138
135
-[**attach**](./specification#Requests_Attach) request: the debug adapter connects to an already running program. Here the end user is responsible for launching and terminating the program.
139
136
140
137
Since arguments for both requests are highly dependent on a specific debugger and debug adapter implementation, the Debug Adapter Protocol does not specify any arguments for these requests.
Copy file name to clipboardExpand all lines: specification.md
+21
Original file line number
Diff line number
Diff line change
@@ -796,6 +796,10 @@ This is typically used to launch the debuggee in a terminal provided by the clie
796
796
797
797
This request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.
798
798
799
+
Client implementations of runInTerminal are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the runInTerminal request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell
800
+
801
+
Some users may wish to take advantage of shell processing in the argument strings. For clients which implement runInTerminal using an intermediary shell, the 'argsCanBeInterpretedByShell' property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.
0 commit comments