问题
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?
回答1:
I find it at last: Debug menu: Linux console
回答2:
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 and Linux Console App. The Windows was set us 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.
After setting the Linux project as the startup project it appeared in the Debug menu:
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)
来源:https://stackoverflow.com/questions/44856823/where-is-the-linux-console-output-when-using-remote-debug-with-visual-studio-201