microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.57k stars 28.13k forks source link

Debug console launches on Run #212918

Open webreidi opened 1 month ago

webreidi commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

Submitting feedback from Diary study conducted, watching participants attempting to run their projects while learning C#.

Steps to Reproduce:

  1. Create a new C# project (I've reproduced this in other languages as well)
  2. Select to Run (happens when using menu and the run button.
  3. Debugger console launches and sends user into debug session.
webreidi commented 1 month ago

@isidorn This is the debug on run issue we talked about today.

WardenGnaw commented 1 month ago

This should be a C# Dev Kit experience issue.

This should be resolved with https://github.com/microsoft/vscode/pull/209893

webreidi commented 1 month ago

@roblourens No, this should not be a C# Dev Kit experience issue. Isidor was mentioning that there is a part when you run for the first time, that it could call the debugger when it shouldn't, which is why Isidor asked me to open this issue.

isidorn commented 1 month ago

The gist of the issue is that here https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/browser/debugService.ts#L607 We should check if user is in debug mode. And if they are in Run mode, we do not open debug console. I can fix this in June if Rob agrees with the change.