Home > other >  Visual Studio Console
Visual Studio Console

Time:09-23

Sorry if I'm being dense, but I can't find the console for Visual Studio. I'm in the subsystem:windows mode because I'm writing an app that requires me to be in this mode. Is there a different method of debugging that doesnt use the console? I have some print statements in my C program but I can't find where they are printed, can anyone help me find it?

CodePudding user response:

You can either use an external terminal, ex. xterm, but I think this guide will help you to open and use an integrated terminal in Vscode:

https://code.visualstudio.com/docs/terminal/basics

CodePudding user response:

Your print statements are currently just lost - you have chosen not to have a console, since you're in a Windows susbsystem.

There's OutputDebugString, which does write to the Visual Studio "Output" tab. But it won't format the output for you. You can do some std::streambuf magic to make std::cout forward to OutputDebugString, so you get std::ostream formatting.

  • Related