1

When pressing ctrl+f5, "start without debugging" (run without attaching the debugger), it waits for a key press in the end of execution. How do I disable it so it would work like f5 (no pause)?

They added a checkbox to automatically close the console in debug but not for non-debug exec?

Zohar Levi
  • 614
  • 6
  • 16
  • Good observation. I never use the "run without debugger" option... – PMF Jul 03 '22 at 20:57
  • Duplicate of https://stackoverflow.com/a/63915561/2905768. Checking the "Close console when debugging ends" item in the debug options works also when _not_ debugging. – PMF Jul 03 '22 at 21:01
  • Does this answer your question? [Avoiding "Press any key to continue" when running console application from Visual Studio](https://stackoverflow.com/questions/17897736/avoiding-press-any-key-to-continue-when-running-console-application-from-visua) – PMF Jul 03 '22 at 21:02
  • No, it doesn't work. I use vs2019, and the option is already checked. – Zohar Levi Jul 04 '22 at 10:18
  • Then it seems they fixed that for vs2022. – PMF Jul 04 '22 at 11:19
  • You mean, they introduced a bug in vs2022 so the option contrary to what it says now also changes the behavior of the non-debug mode? Any guess if this bug will remain in future versions? – Zohar Levi Jul 04 '22 at 22:17
  • I don't know whether Microsoft thinks they fixed a bug or introduced another one. But as it is now, the only small issue is that the text is inconsistent, but I _suppose_ it's going to stay this way. – PMF Jul 05 '22 at 04:30
  • Okay, so post an answer. You added the information of vs2022, which didn't work for me on vs2019 when I first found your link (before posting). – Zohar Levi Jul 05 '22 at 09:07

1 Answers1

2

The issue seems to be fixed in VS2022. As noted here the option "Close console when debugging ends" in the debug settings works also when starting without debugging, but apparently only for VS2022. The text of the option is misleading (probably somebody forgot to update that when the behavior was changed) but it seems the new behavior is desired.

PMF
  • 14,535
  • 3
  • 23
  • 49