Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respect csharp.debug.console in all cases #7878

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
const program = configuration.hosted ? configuration.program : 'dotnet';
const cwd = configuration.cwd || '${workspaceFolder}';
const args = configuration.hosted ? [] : ['run'];
const console = configuration.console;

const app = {
name: SERVER_APP_NAME,
Expand All @@ -96,6 +97,7 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
launchBrowser: {
enabled: false,
},
console: console,
...configuration.dotNetConfig,
};

Expand Down
5 changes: 4 additions & 1 deletion src/shared/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class AssetGenerator {
}

// Override console option with user option.
if (forDotnetConfiguration && programLaunchType === ProgramLaunchType.Console && key == 'console') {
if (forDotnetConfiguration && key == 'console') {
const consoleOption: string | undefined = AssetGenerator.getConsoleDebugOption();
if (consoleOption) {
configuration.console = consoleOption;
Expand Down Expand Up @@ -370,6 +370,7 @@ export function createWebLaunchConfiguration(programPath: string, workingDirecto
program: `${util.convertNativePathToPosix(programPath)}`,
args: Array(0),
cwd: `${util.convertNativePathToPosix(workingDirectory)}`,
console: 'internalConsole',
stopAtEntry: false,
'OS-COMMENT5': vscode.l10n.t(
'Enable launching a web browser when ASP.NET Core starts. For more information: {0}',
Expand Down Expand Up @@ -402,6 +403,7 @@ export function createBlazorWebAssemblyHostedLaunchConfiguration(
'OS-COMMENT1': vscode.l10n.t('If you have changed target frameworks, make sure to update the program path.'),
program: `${util.convertNativePathToPosix(programPath)}`,
cwd: `${util.convertNativePathToPosix(workingDirectory)}`,
console: 'internalConsole',
};

return JSON.stringify(configuration);
Expand All @@ -413,6 +415,7 @@ export function createBlazorWebAssemblyStandaloneLaunchConfiguration(workingDire
type: 'blazorwasm',
request: 'launch',
cwd: `${util.convertNativePathToPosix(workingDirectory)}`,
console: 'internalConsole',
};

return JSON.stringify(configuration);
Expand Down
Loading