Visual Studio/C++:如何关闭某些首次异常调试消息?

发布于 2024-07-15 11:40:52 字数 594 浏览 9 评论 0原文

当我在调试模式下执行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

比忠 2024-07-22 11:40:52

我认为没有办法。

您可以右键单击输出窗口并禁用所有异常消息,但它不再具有过滤功能。

也就是说,如果您绝望,您可以保存输出,过滤它,然后使用添加到“工具”菜单中的简单工具,将其转储回输出窗口(它出现在工具标题下,而不是“调试” )。 我以前也这样做过,但通常这样做会带来太多麻烦而收效甚微。

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.

深爱不及久伴 2024-07-22 11:40:52

我认为使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文