mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Auto merge of #17495 - listochkin:pass-cargo-extra-args-for-debugger, r=Veykril
pass cargo extra args when debugging fixes #17128
This commit is contained in:
commit
e6fd485683
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,7 @@ import type * as ra from "./lsp_ext";
|
||||||
|
|
||||||
import { Cargo, getRustcId, getSysroot } from "./toolchain";
|
import { Cargo, getRustcId, getSysroot } from "./toolchain";
|
||||||
import type { Ctx } from "./ctx";
|
import type { Ctx } from "./ctx";
|
||||||
import { prepareEnv } from "./run";
|
import { createCargoArgs, prepareEnv } from "./run";
|
||||||
import { isCargoRunnableArgs, unwrapUndefinable } from "./util";
|
import { isCargoRunnableArgs, unwrapUndefinable } from "./util";
|
||||||
|
|
||||||
const debugOutput = vscode.window.createOutputChannel("Debug");
|
const debugOutput = vscode.window.createOutputChannel("Debug");
|
||||||
|
@ -180,7 +180,8 @@ async function getDebugExecutable(
|
||||||
env: Record<string, string>,
|
env: Record<string, string>,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const cargo = new Cargo(runnableArgs.workspaceRoot || ".", debugOutput, env);
|
const cargo = new Cargo(runnableArgs.workspaceRoot || ".", debugOutput, env);
|
||||||
const executable = await cargo.executableFromArgs(runnableArgs.cargoArgs);
|
const args = createCargoArgs(runnableArgs);
|
||||||
|
const executable = await cargo.executableFromArgs(args);
|
||||||
|
|
||||||
// if we are here, there were no compilation errors.
|
// if we are here, there were no compilation errors.
|
||||||
return executable;
|
return executable;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue