在 VS2010 中调试 Win32 MFC 应用程序时显示控制台窗口 [英] Show console window when debugging Win32 MFC application in VS2010
问题描述
这里我有一个 MFC 项目.当我按 F5 时,我也想看到控制台窗口.然后我就可以看到输出了.
Here I have a MFC project. I want to see the console window also when I press F5. Then I can see the output.
我可以在项目设置中进行一些配置以启用此功能而不更改代码吗?
Could I do some configuration in Project setting to enable this without changing the code?
谢谢.
[已解决]
打开项目的属性页"对话框.有关详细信息,请参阅设置 Visual C++ 项目属性.
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
点击链接器文件夹.
点击系统属性页.
修改子系统属性.
控制台 (/SUBSYSTEM:CONSOLE)
Console (/SUBSYSTEM:CONSOLE)
推荐答案
如果你使用的是VC6,步骤类似:
If you are using VC6, the steps are similar:
项目->设置
选择链接标签
在项目选项文本框的底部,查找/subsystem:windows 设置.修改此为读取/subsystem:console
At the bottom in the Project Options text box, look for the /subsystem:windows setting. Modify this to read /subsystem:console
重新编译,现在当您启动应用程序时,将使用控制台窗口启动.
Recompile, and now when you launch the application will launch with a console window.
这篇关于在 VS2010 中调试 Win32 MFC 应用程序时显示控制台窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!