diff options
author | vsrs <[email protected]> | 2020-04-30 13:25:04 +0100 |
---|---|---|
committer | vsrs <[email protected]> | 2020-04-30 13:25:04 +0100 |
commit | eb6f9c23e19eae9015bd859941c5e8cbf4622cba (patch) | |
tree | 2351f7107655517008c4adc85b16b36d76e3a1ae /editors/code/src/commands | |
parent | 73a1947d19b4d3c29aa462e856e3d410d6e1e5dd (diff) |
pass Cargo errors to the Debug output channel
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/runnables.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index 9b0780650..e8035c7d2 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts | |||
@@ -78,10 +78,15 @@ function getLldbDebugConfig(config: ra.Runnable, sourceFileMap: Record<string, s | |||
78 | }; | 78 | }; |
79 | } | 79 | } |
80 | 80 | ||
81 | const debugOutput = vscode.window.createOutputChannel("Debug"); | ||
82 | |||
81 | async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<string, string>): Promise<vscode.DebugConfiguration> { | 83 | async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<string, string>): Promise<vscode.DebugConfiguration> { |
82 | let cargo = new Cargo(config.cwd || '.'); | 84 | debugOutput.clear(); |
85 | |||
86 | let cargo = new Cargo(config.cwd || '.', debugOutput); | ||
83 | let executable = await cargo.executableFromArgs(config.args, config.extraArgs); | 87 | let executable = await cargo.executableFromArgs(config.args, config.extraArgs); |
84 | 88 | ||
89 | // if we are here, there were no compilation errors. | ||
85 | return { | 90 | return { |
86 | type: (os.platform() === "win32") ? "cppvsdbg" : 'cppdbg', | 91 | type: (os.platform() === "win32") ? "cppvsdbg" : 'cppdbg', |
87 | request: "launch", | 92 | request: "launch", |