File tree 2 files changed +4
-3
lines changed
src/tools/rust-analyzer/editors/code/src
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ function getCCppDebugConfig(
192
192
name : runnable . label ,
193
193
program : executable ,
194
194
args : runnable . args . executableArgs ,
195
- cwd : runnable . args . workspaceRoot ,
195
+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
196
196
sourceFileMap,
197
197
env,
198
198
// See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941
@@ -214,7 +214,7 @@ function getCodeLldbDebugConfig(
214
214
name : runnable . label ,
215
215
program : executable ,
216
216
args : runnable . args . executableArgs ,
217
- cwd : runnable . args . workspaceRoot ,
217
+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
218
218
sourceMap : sourceFileMap ,
219
219
sourceLanguages : [ "rust" ] ,
220
220
env,
@@ -234,7 +234,7 @@ function getNativeDebugConfig(
234
234
target : executable ,
235
235
// See https://github.com/WebFreak001/code-debug/issues/359
236
236
arguments : quote ( runnable . args . executableArgs ) ,
237
- cwd : runnable . args . workspaceRoot ,
237
+ cwd : runnable . args . cwd || runnable . args . workspaceRoot || "." ,
238
238
env,
239
239
valuesFormatting : "prettyPrinters" ,
240
240
} ;
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export type Runnable = {
226
226
kind : "cargo" ;
227
227
args : {
228
228
workspaceRoot ?: string ;
229
+ cwd ?: string ;
229
230
cargoArgs : string [ ] ;
230
231
cargoExtraArgs : string [ ] ;
231
232
executableArgs : string [ ] ;
You can’t perform that action at this time.
0 commit comments