Visual Studio/C++:如何关闭某些首次异常调试消息?
当我在调试模式下执行 C++ 代码(使用 CGAL
库)时,我在 Output
窗口中看到许多有关首次异常的调试消息CGAL::Uncertain_conversion_exception
。 我知道首次机会例外是什么。
现在,如何关闭这种一种异常 (CGAL::Uncertain_conversion_exception
) 的调试消息显示?
我喜欢尽可能详细的调试消息,但是一旦我知道某个异常是什么并且我已经处理了它,我希望它消失。 例如,在本例中,CGAL 异常是据说是幼稚的(并且信息丰富),而不是值得关注。 我想将其关闭,但仍然能够密切关注任何其他(新的)首次机会异常。 这在 Visual Studio 2008 中可能吗? 我的要求是不是太多了?
When I execute my C++ code (which uses the CGAL
library) under debug mode, I see a lot of debug messages in the Output
window about a first-chance exception CGAL::Uncertain_conversion_exception
. I am aware of what a first-chance exception is.
Now, how do I turn off the display of debug messages for this one kind of exception (CGAL::Uncertain_conversion_exception
)?
I like my debug messages as detailed as possible, but once I know what a certain exception is about and I have dealt with it, I would like it to go away. For example, in this case the CGAL exception is supposedly naive (and informative) and not a cause for concern. I would like to turn it off, but still be able to keep my eyes open for any other (new) first-chance exceptions. Is this possible in Visual Studio 2008? Am I asking for too much?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为没有办法。
您可以右键单击输出窗口并禁用所有异常消息,但它不再具有过滤功能。
也就是说,如果您绝望,您可以保存输出,过滤它,然后使用添加到“工具”菜单中的简单工具,将其转储回输出窗口(它出现在工具标题下,而不是“调试” )。 我以前也这样做过,但通常这样做会带来太多麻烦而收效甚微。
I don't think there is a way.
You can right-click into the output window and disable all exception messages, but it doesn't come with anymore of a filtering ability.
That said, if you're desperate, you can save the output, filter it, and, using a simple tool added to the Tools menu, dump it back into the output window (where it appears under your tool's title instead of "Debug"). I've done this before, but usually this is too much hassle for too little gains.
我认为使用 VS2008 不可能做到这一点。 但是,您可以使用 DbgView.exe 并将过滤器设置为包含/排除要显示的字符串。
I don't think that will be possible to do using VS2008. However, you can use the DbgView.exe and set the filter to include/exclude the strings you want to display.