Description
Steps to reproduce
- Create new web app with
dotnet new blazor
- Create launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "dotnet",
"request": "launch",
"name": "Launch Edge against localhost",
"projectPath":"${workspaceFolder}/myapp.csproj"
}
]
}
- Create settings.json
{
"csharp.debug.console": "externalTerminal"
}
- Debug the app, but an external terminal does not pop open.
- The message tells the user to press Ctrl+C but this doesn't work in debug console.
Microsoft.Hosting.Lifetime: Information: Now listening on: https://localhost:7059
Microsoft.Hosting.Lifetime: Information: Now listening on: http://localhost:5000
Microsoft.Hosting.Lifetime: Information: Application started. Press Ctrl+C to shut down.
Microsoft.Hosting.Lifetime: Information: Hosting environment: Development
Microsoft.Hosting.Lifetime: Information: Content root path: C:\src\myapp
Expected behavior
It's expected to be able to pop open a terminal with "csharp.debug.console": "externalTerminal"
Actual behavior
csharp.debug.console is ignored
Additional context
Traditional Visual Studio and base C# vscode extension allow opening external terminal, so it's a surprise behavior that this setting is silently ignored. All dotnet apps are technically console apps.
Workaround since the extension code matches on sdk string: microsoft/vscode-dotnettools#1473
The code changes to get this working are here #7878 and I note that browser auto-open continues to function.
This is basically a duplicate of this ticket #7165
I have a real world project where Ctrl+C is relevant because my console app uses the web sdk and launches additional processes, and I needed a way to debug Ctrl+C, SIGINT, X button, etc, in order to debug child process termination behavior.
Suggested change to documentation is to say the app's console
in place of console projects
.