I have the same. VC2022. It hangs in KernelBase WriteFile. After removing .vs it run at least twice fine. Version 17.2.6, x86, Debug
Visual Studio 2019 hanging in cout/printf
Tyler
1
Reputation point
When debugging in Visual Studio 2019, any time my program attempts to cout or print it causes the debugger to stall infinitely. If I pause the debugger and look at the main thread, it will always be in 'ucrtbased.dll!write_text_ansi_nolock' once it gets stalled.
When I run the built exe on it's own, it prints to console perfectly fine. The stalling happens while the application is single threaded, just trying to console print out a single line of text with no variables.
How can I fix this, or look inside the above DLL to see what is happening?