Skip to content

Commit

Permalink
pass cargo extra args when debug
Browse files Browse the repository at this point in the history
  • Loading branch information
listochkin committed Jun 25, 2024
1 parent 7b11fde commit cb523fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions editors/code/src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type * as ra from "./lsp_ext";

import { Cargo, getRustcId, getSysroot } from "./toolchain";
import type { Ctx } from "./ctx";
import { prepareEnv } from "./run";
import { createCargoArgs, prepareEnv } from "./run";
import { isCargoRunnableArgs, unwrapUndefinable } from "./util";

const debugOutput = vscode.window.createOutputChannel("Debug");
Expand Down Expand Up @@ -180,7 +180,8 @@ async function getDebugExecutable(
env: Record<string, string>,
): Promise<string> {
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.
return executable;
Expand Down

0 comments on commit cb523fc

Please sign in to comment.