File tree Expand file tree Collapse file tree
src/tools/rust-analyzer/editors/code/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ function getCCppDebugConfig(
192192name : runnable . label ,
193193program : executable ,
194194args : runnable . args . executableArgs ,
195- cwd : runnable . args . workspaceRoot ,
195+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
196196 sourceFileMap,
197197 env,
198198// See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941
@@ -214,7 +214,7 @@ function getCodeLldbDebugConfig(
214214name : runnable . label ,
215215program : executable ,
216216args : runnable . args . executableArgs ,
217- cwd : runnable . args . workspaceRoot ,
217+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
218218sourceMap : sourceFileMap ,
219219sourceLanguages : [ "rust" ] ,
220220 env,
@@ -234,7 +234,7 @@ function getNativeDebugConfig(
234234target : executable ,
235235// See https://github.com/WebFreak001/code-debug/issues/359
236236arguments : quote ( runnable . args . executableArgs ) ,
237- cwd : runnable . args . workspaceRoot ,
237+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
238238 env,
239239valuesFormatting : "prettyPrinters" ,
240240} ;
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export type Runnable = {
226226kind : "cargo" ;
227227args : {
228228workspaceRoot ?: string ;
229+ cwd ?: string ;
229230cargoArgs : string [ ] ;
230231cargoExtraArgs : string [ ] ;
231232executableArgs : string [ ] ;
You can’t perform that action at this time.
0 commit comments