Supress从Visual Studio输出窗格(C ++)输出 [英] Supress output from Visual Studio output pane (C++)

查看:92
本文介绍了Supress从Visual Studio输出窗格(C ++)输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Visual Studio调试器中运行Win32项目时,我得到了如此庞大的输出:关于哪些DLL的加载,优先机会异常等等.

When I run my Win32 project in the Visual Studio debugger, I get this huge screed of output about which DLLs were loaded, first-chance exceptions, and so on.

有没有一种方法可以抑制此输出?

Is there a way that I can suppress this output?

总有一天,我可能想知道何时加载"C:\ Windows \ SysWOW64 \ ntdll.dll",但通常我不在乎.当我正在运行单元测试并且只想被告知是否任何测试失败时,尤其如此.

Some day, I might want to know when 'C:\Windows\SysWOW64\ntdll.dll' was loaded, but normally I don't care. This is especially true when I'm running unit tests, and just want to be told whether any of the tests failed.

这些内容不会与控制台应用程序一起输出,而是与Windows应用程序一起输出.为了说明我的意思,下面是最近一次单元测试运行输出的第一行.

This stuff isn't output with console applications, but it is with windows applications. To give an example of what I mean, here are the first lines from the output of a recent unit-test run.

'MyProject.exe': Loaded 'C:\dev\MyProject\Testing\MyProject.exe', Symbols loaded.
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\dbghelp.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'MyProject.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'

... and on and on ...

推荐答案

在输出窗口中右键单击.您将获得一个弹出菜单,您可以在其中取消选择不想看到的消息类型(例如,模块加载"和模块卸载"消息).不幸的是,它把所有异常消息放在一起,所以(至少是AFAIK)您不能排除第一次机会异常消息(您很少在意),而保留第二次机会异常消息(您通常会在意).

Right click in the output window. You'll get a popup menu where you can de-select types of messages you don't want to see (e.g. Module Load and Module Unload messages). Unfortunately, it puts all the Exception Messages together, so (at least AFAIK) you can't exclude first chance exception messages (which you rarely care about) but keep second chance exception messages (which you usually do care about).

这篇关于Supress从Visual Studio输出窗格(C ++)输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆