Skip to content

Commit 9e7b2d6

Browse files
authored
Fix "console" squiggle with "cppdbg". (#7051)
* Fix "console" squiggle with "cppdbg". * Change "default"
1 parent 2199ec3 commit 9e7b2d6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@
20042004
"%c_cpp.debuggers.cppvsdbg.console.newExternalWindow.description%"
20052005
],
20062006
"description": "%c_cpp.debuggers.cppvsdbg.console.description%",
2007-
"default": "externalTerminal"
2007+
"default": "internalConsole"
20082008
},
20092009
"sourceFileMap": {
20102010
"type": "object",

Extension/src/Debugger/configurationProvider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider {
182182

183183
newConfig.name = compilerName + buildAndDebugActiveFileStr();
184184
newConfig.preLaunchTask = task.name;
185-
newConfig.console = "externalTerminal";
185+
if (newConfig.type === "cppdbg") {
186+
newConfig.externalConsole = false;
187+
} else {
188+
newConfig.console = "externalTerminal";
189+
}
186190
const exeName: string = path.join("${fileDirname}", "${fileBasenameNoExtension}");
187191
const isWindows: boolean = platform === 'win32';
188192
newConfig.program = isWindows ? exeName + ".exe" : exeName;

Extension/src/Debugger/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function createLaunchString(name: string, type: string, executable: string): str
4444
"stopAtEntry": false,
4545
"cwd": "$\{workspaceFolder\}",
4646
"environment": [],
47-
"console": "externalTerminal"
47+
${ type === "cppdbg" ? `"externalConsole": false` : `"console": "externalTerminal"` }
4848
`;
4949
}
5050

0 commit comments

Comments
 (0)