-
Notifications
You must be signed in to change notification settings - Fork 676
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
Fix issue 5102 #5189
Fix issue 5102 #5189
Conversation
Test configuration: {
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net6.0/hellocsharp.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false,
"envFile": "${input:getPathToFile}"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
],
"inputs": [
{
"id": "getPathToFile",
"description": "Choose environment file",
"type": "pickString",
"options": [
"${workspaceFolder}/richard.env",
"${workspaceFolder}/john.env"
]
}
]
} Program: while (true) {
var ufn = System.Environment.GetEnvironmentVariable("USER_FIRST_NAME");
if (ufn != null) {
Console.WriteLine($"Hello, {ufn}! Tell me how you're doing?");
} else {
Console.WriteLine("Hello, World! Tell me how you're doing?");
}
Thread.Sleep(TimeSpan.FromSeconds(3));
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
One thing to verify: if you debug multiple times, will VS Code always open the debug console on startup? I want to verify VS Code still respects |
Yes, during my testing VS Code always opens Debug Console when debugging is started, even if I manually close it between debug sessions. |
Resolves #5102