Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a37cfb

Browse files
committed
Use cwd from runnable.args for debugger
1 parent7b54c82 commit1a37cfb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎src/tools/rust-analyzer/editors/code/src/debug.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function getCCppDebugConfig(
192192
name:runnable.label,
193193
program:executable,
194194
args: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(
214214
name:runnable.label,
215215
program:executable,
216216
args:runnable.args.executableArgs,
217-
cwd:runnable.args.workspaceRoot,
217+
cwd:runnable.args.cwd||runnable.args.workspaceRoot||".",
218218
sourceMap:sourceFileMap,
219219
sourceLanguages:["rust"],
220220
env,
@@ -234,7 +234,7 @@ function getNativeDebugConfig(
234234
target:executable,
235235
// See https://github.com/WebFreak001/code-debug/issues/359
236236
arguments:quote(runnable.args.executableArgs),
237-
cwd:runnable.args.workspaceRoot,
237+
cwd:runnable.args.cwd||runnable.args.workspaceRoot||".",
238238
env,
239239
valuesFormatting:"prettyPrinters",
240240
};

‎src/tools/rust-analyzer/editors/code/src/lsp_ext.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ export type Runnable = {
226226
kind:"cargo";
227227
args:{
228228
workspaceRoot?:string;
229+
cwd?:string;
229230
cargoArgs:string[];
230231
cargoExtraArgs:string[];
231232
executableArgs:string[];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp