mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
Use cwd from runnable.args for debugger
This commit is contained in:
parent
7b54c8231e
commit
1a37cfb703
@ -192,7 +192,7 @@ function getCCppDebugConfig(
|
||||
name: runnable.label,
|
||||
program: executable,
|
||||
args: runnable.args.executableArgs,
|
||||
cwd: runnable.args.workspaceRoot,
|
||||
cwd: runnable.args.cwd || runnable.args.workspaceRoot || ".",
|
||||
sourceFileMap,
|
||||
env,
|
||||
// See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941
|
||||
@ -214,7 +214,7 @@ function getCodeLldbDebugConfig(
|
||||
name: runnable.label,
|
||||
program: executable,
|
||||
args: runnable.args.executableArgs,
|
||||
cwd: runnable.args.workspaceRoot,
|
||||
cwd: runnable.args.cwd || runnable.args.workspaceRoot || ".",
|
||||
sourceMap: sourceFileMap,
|
||||
sourceLanguages: ["rust"],
|
||||
env,
|
||||
@ -234,7 +234,7 @@ function getNativeDebugConfig(
|
||||
target: executable,
|
||||
// See https://github.com/WebFreak001/code-debug/issues/359
|
||||
arguments: quote(runnable.args.executableArgs),
|
||||
cwd: runnable.args.workspaceRoot,
|
||||
cwd: runnable.args.cwd || runnable.args.workspaceRoot || ".",
|
||||
env,
|
||||
valuesFormatting: "prettyPrinters",
|
||||
};
|
||||
|
@ -226,6 +226,7 @@ export type Runnable = {
|
||||
kind: "cargo";
|
||||
args: {
|
||||
workspaceRoot?: string;
|
||||
cwd?: string;
|
||||
cargoArgs: string[];
|
||||
cargoExtraArgs: string[];
|
||||
executableArgs: string[];
|
||||
|
Loading…
Reference in New Issue
Block a user