Skip to content

Commit 97d492f

Browse files
Hide debug console when using "console": "integratedTerminal" (#6523)
Previously the C# extension would always set `internalConsoleOptions` (which controls if VS Code shows the debug console) to `openOnSessionStart`. The PR changes things so that we will use `neverOpen` if we are going to use the integrated terminal. This resolves #6516
1 parent 7d26eab commit 97d492f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/shared/configurationProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ export class BaseVsDbgConfigurationProvider implements vscode.DebugConfiguration
7676
debugConfiguration.cwd = folder?.uri.fsPath; // Workspace folder
7777
}
7878

79-
debugConfiguration.internalConsoleOptions ??= 'openOnSessionStart';
79+
if (!debugConfiguration.internalConsoleOptions) {
80+
// If the target app is NOT using integratedTerminal, use 'openOnSessionStart' so that the debug console can be seen
81+
// If the target app is using integratedTerminal, use 'neverOpen' so that the integrated terminal doesn't get hidden
82+
debugConfiguration.internalConsoleOptions =
83+
debugConfiguration.console === 'integratedTerminal' ? 'neverOpen' : 'openOnSessionStart';
84+
}
8085

8186
// read from envFile and set config.env
8287
if (debugConfiguration.envFile !== undefined && debugConfiguration.envFile.length > 0) {

0 commit comments

Comments
 (0)