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