mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
pass Cargo errors to the Debug output channel
This commit is contained in:
parent
73a1947d19
commit
eb6f9c23e1
3 changed files with 19 additions and 7 deletions
|
@ -78,10 +78,15 @@ function getLldbDebugConfig(config: ra.Runnable, sourceFileMap: Record<string, s
|
|||
};
|
||||
}
|
||||
|
||||
const debugOutput = vscode.window.createOutputChannel("Debug");
|
||||
|
||||
async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<string, string>): Promise<vscode.DebugConfiguration> {
|
||||
let cargo = new Cargo(config.cwd || '.');
|
||||
debugOutput.clear();
|
||||
|
||||
let cargo = new Cargo(config.cwd || '.', debugOutput);
|
||||
let executable = await cargo.executableFromArgs(config.args, config.extraArgs);
|
||||
|
||||
// if we are here, there were no compilation errors.
|
||||
return {
|
||||
type: (os.platform() === "win32") ? "cppvsdbg" : 'cppdbg',
|
||||
request: "launch",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue