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

No Debug mode is too visually similar to debug mode #594

Closed
claudiaregio opened this issue Oct 9, 2023 · 4 comments
Closed

No Debug mode is too visually similar to debug mode #594

claudiaregio opened this issue Oct 9, 2023 · 4 comments
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire bug Something isn't working

Comments

@claudiaregio
Copy link

claudiaregio commented Oct 9, 2023

Describe the Issue

Hitting the "run project associated with this file" OR "run without debugging" from VS Code menu starts a debugging session instead of just running

image

image

Steps To Reproduce

  1. Create a simple console app
  2. Have Program.cs file open
  3. Click "Run project associated with this file" in the menu in the top right

image

Expected Behavior

I would expect this to behave the same way as if I were in the project folder in the terminal and ran "dotnet run".

  1. Project runs
  2. No debug toolbar appears
  3. Focus goes to "Terminal" not "Debug Console"

Environment Information

  • Windows 11
  • C# Dev Kit: v0.5.150
  • C#: v2.5.30
@claudiaregio claudiaregio added the bug Something isn't working label Oct 9, 2023
@microsoft-issue-labeler microsoft-issue-labeler bot added the area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire label Oct 9, 2023
@gregg-miskelly
Copy link
Member

This bug is incorrect - we aren't debugging. However, VS Code makes almost no distinction in the UI between debugging and not debugging. The only way you can tell:

  1. The pause button does nothing in 'noDebug' mode
  2. In 'noDebug' mode, the .NET debugger will not print modules to the debug console

Related issues:

@gregg-miskelly gregg-miskelly changed the title [BUG] "run project associated with file" starts debugging session No Debug mode is too visually similar to debug mode Oct 11, 2023
@claudiaregio
Copy link
Author

claudiaregio commented Oct 11, 2023

I wrote it under "expected behavior", but in case it helps, the expected experience is identical to what I'm seeing Python do here: https://code.visualstudio.com/docs/python/python-tutorial#_run-hello-world

@gregg-miskelly
Copy link
Member

@claudiaregio Python has multiple ways to "Run without debugging". Some of their gestures just directly run the target script in the terminal, while others will use the VS Code APIs and would have the same problem as in this issue with there being very little distinction between run with and without debugging.

@gregg-miskelly
Copy link
Member

I opened two more issues relating to this:

I think once we have fixes for those two problems and dotnet/vscode-csharp#6516, this scenario should be much better. So I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants