Where is the Linux Console Output When Using Remote Debug with Visual Studio 2017?

Viewed 5903

My Visual Studio 2017 (VS2017) connects to the Linux system successfully with the following code:

#include <cstdio>

int main()
{
    printf("hello from ConsoleApplication1!\n");
    return 0;
}

But, when the code executes, I can't see the "hello from ConsoleApplication1!" message in the VS2017 output window. Where can I find it?

2 Answers

For those who don't find "Linux Console" under Debug menu:

What happen to me was that I had one solution with 2 projects- Console App (Windows) and Linux Console App. The Windows was set as the start up project, and I debugged the Linux project by right-clicking the project->Debug->Start New Instance. I couldn't find the Linux Condole Window anywhere even when debugging.

enter image description here

After setting the Linux project as the startup project it appeared in the Debug menu:

enter image description here

Afterwards I changed it back and kept the Linux Console Window Open. It's an ugly hack and I hope that Visual Studio will change it (I'm using VS 2019 16.1.3)

Related