File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -178,15 +178,17 @@ The default hostname being used `localhost`.
178
178
179
179
Debugging sessions can also be starting using special URIs.
180
180
181
- The ` vscode://llvm-vs-code-extensions.lldb-dap/launch/config ?config={launch-config} `
181
+ The ` vscode://llvm-vs-code-extensions.lldb-dap/start ?config={launch-config} `
182
182
URI accepts a [ URL-encoded] ( https://en.wikipedia.org/wiki/Percent-encoding )
183
183
JSON launch config.
184
184
185
185
This is useful for integration with custom scripts to start debugging
186
186
sessions. The URI might be printed to the terminal, potentially using
187
187
[ OSC-8 hyperlinks] ( https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda ) ,
188
- or passed to ` vscode --open-url ` or ` xdg-open ` , although mileage may vary
189
- depending on your specific debugging setup.
188
+ or passed to ` code --open-url ` or ` xdg-open ` , although mileage may vary depending
189
+ on your specific debugging setup. E.g., ` code --open-url ` will not work when using a
190
+ SSH remote session. Furthermore, placeholders such as ` ${workspaceFolder} ` are not
191
+ supported within launch URLs.
190
192
191
193
### Configuration Settings Reference
192
194
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export class LaunchUriHandler implements vscode.UriHandler {
4
4
async handleUri ( uri : vscode . Uri ) {
5
5
try {
6
6
const params = new URLSearchParams ( uri . query ) ;
7
- if ( uri . path == '/launch/config ' ) {
7
+ if ( uri . path == '/start ' ) {
8
8
const configJson = params . get ( "config" ) ;
9
9
if ( configJson === null ) {
10
10
throw new Error ( "Missing `config` URI parameter" ) ;
@@ -16,7 +16,8 @@ export class LaunchUriHandler implements vscode.UriHandler {
16
16
name : '' ,
17
17
} ;
18
18
Object . assign ( debugConfig , JSON . parse ( configJson ) ) ;
19
- debugConfig . name = debugConfig . name || debugConfig . program || "Adhoc Launch" ;
19
+ const defaultName = debugConfig . request == 'launch' ? "URL-based Launch" : "URL-based Attach" ;
20
+ debugConfig . name = debugConfig . name || debugConfig . program || defaultName ;
20
21
// Force the type to `lldb-dap`. We don't want to allow launching any other
21
22
// Debug Adapters using this URI scheme.
22
23
if ( debugConfig . type != "lldb-dap" ) {
@@ -30,8 +31,8 @@ export class LaunchUriHandler implements vscode.UriHandler {
30
31
if ( err instanceof Error ) {
31
32
await vscode . window . showErrorMessage ( `Failed to handle lldb-dap URI request: ${ err . message } ` ) ;
32
33
} else {
33
- await vscode . window . showErrorMessage ( `Failed to handle lldb-dap URI request` ) ;
34
+ await vscode . window . showErrorMessage ( `Failed to handle lldb-dap URI request: ${ JSON . stringify ( err ) } ` ) ;
34
35
}
35
36
}
36
37
}
37
- }
38
+ }
You can’t perform that action at this time.
0 commit comments