@@ -6,7 +6,14 @@ import type * as ra from "./lsp_ext";
6
6
import { Cargo } from "./toolchain" ;
7
7
import type { Ctx } from "./ctx" ;
8
8
import { createTaskFromRunnable , prepareEnv } from "./run" ;
9
- import { execute , isCargoRunnableArgs , unwrapUndefinable , log , normalizeDriveLetter , Env } from "./util" ;
9
+ import {
10
+ execute ,
11
+ isCargoRunnableArgs ,
12
+ unwrapUndefinable ,
13
+ log ,
14
+ normalizeDriveLetter ,
15
+ Env ,
16
+ } from "./util" ;
10
17
import type { Config } from "./config" ;
11
18
12
19
// Here we want to keep track on everything that's currently running
@@ -108,9 +115,9 @@ async function getDebugConfiguration(
108
115
109
116
await vscode . window . showErrorMessage (
110
117
`Install [CodeLLDB](command:${ commandCodeLLDB } "Open CodeLLDB")` +
111
- `, [lldb-dap](command:${ commandLLDBDap } "Open lldb-dap")` +
112
- `, [C/C++](command:${ commandCCpp } "Open C/C++") ` +
113
- `or [Native Debug](command:${ commandNativeDebug } "Open Native Debug") for debugging.` ,
118
+ `, [lldb-dap](command:${ commandLLDBDap } "Open lldb-dap")` +
119
+ `, [C/C++](command:${ commandCCpp } "Open C/C++") ` +
120
+ `or [Native Debug](command:${ commandNativeDebug } "Open Native Debug") for debugging.` ,
114
121
) ;
115
122
return ;
116
123
}
@@ -124,7 +131,7 @@ async function getDebugConfiguration(
124
131
! isMultiFolderWorkspace || ! runnableArgs . workspaceRoot
125
132
? firstWorkspace
126
133
: workspaceFolders . find ( ( w ) => runnableArgs . workspaceRoot ?. includes ( w . uri . fsPath ) ) ||
127
- firstWorkspace ;
134
+ firstWorkspace ;
128
135
129
136
const workspace = unwrapUndefinable ( maybeWorkspace ) ;
130
137
const wsFolder = normalizeDriveLetter ( path . normalize ( workspace . uri . fsPath ) ) ;
@@ -206,10 +213,7 @@ type SourceFileMap = {
206
213
destination : string ;
207
214
} ;
208
215
209
- async function discoverSourceFileMap (
210
- env : Env ,
211
- cwd : string ,
212
- ) : Promise < SourceFileMap | undefined > {
216
+ async function discoverSourceFileMap ( env : Env , cwd : string ) : Promise < SourceFileMap | undefined > {
213
217
const sysroot = env [ "RUSTC_TOOLCHAIN" ] ;
214
218
if ( sysroot ) {
215
219
// let's try to use the default toolchain
@@ -304,10 +308,7 @@ const knownEngines: {
304
308
} ,
305
309
} ;
306
310
307
- async function getDebugExecutable (
308
- runnableArgs : ra . CargoRunnableArgs ,
309
- env : Env ,
310
- ) : Promise < string > {
311
+ async function getDebugExecutable ( runnableArgs : ra . CargoRunnableArgs , env : Env ) : Promise < string > {
311
312
const cargo = new Cargo ( runnableArgs . workspaceRoot || "." , env ) ;
312
313
const executable = await cargo . executableFromArgs ( runnableArgs ) ;
313
314
0 commit comments