Skip to content

Commit

Permalink
Fix "console" squiggle with "cppdbg". (#7051)
Browse files Browse the repository at this point in the history
* Fix "console" squiggle with "cppdbg".
* Change "default"
  • Loading branch information
sean-mcmanus authored Feb 25, 2021
1 parent 2199ec3 commit 9e7b2d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@
"%c_cpp.debuggers.cppvsdbg.console.newExternalWindow.description%"
],
"description": "%c_cpp.debuggers.cppvsdbg.console.description%",
"default": "externalTerminal"
"default": "internalConsole"
},
"sourceFileMap": {
"type": "object",
Expand Down
6 changes: 5 additions & 1 deletion Extension/src/Debugger/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider {

newConfig.name = compilerName + buildAndDebugActiveFileStr();
newConfig.preLaunchTask = task.name;
newConfig.console = "externalTerminal";
if (newConfig.type === "cppdbg") {
newConfig.externalConsole = false;
} else {
newConfig.console = "externalTerminal";
}
const exeName: string = path.join("${fileDirname}", "${fileBasenameNoExtension}");
const isWindows: boolean = platform === 'win32';
newConfig.program = isWindows ? exeName + ".exe" : exeName;
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/Debugger/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function createLaunchString(name: string, type: string, executable: string): str
"stopAtEntry": false,
"cwd": "$\{workspaceFolder\}",
"environment": [],
"console": "externalTerminal"
${ type === "cppdbg" ? `"externalConsole": false` : `"console": "externalTerminal"` }
`;
}

Expand Down

0 comments on commit 9e7b2d6

Please sign in to comment.