pass Cargo errors to the Debug output channel

This commit is contained in:
vsrs 2020-04-30 15:25:04 +03:00
parent 73a1947d19
commit eb6f9c23e1
3 changed files with 19 additions and 7 deletions

View file

@ -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",