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

你。 提交于 2019-12-21 17:06:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!