【发布时间】:2012-11-21 17:04:55
【问题描述】:
有没有办法从未处理的异常中查看解释性字符串?我正在使用 Visual Studio 2012 Express,但似乎找不到查看它的方法。
当我运行以下代码时:
#include <stdexcept>
int main(int argc, char* argv[])
{
throw std::runtime_error("warp core breach");
return 0;
}
我在输出窗口中得到的只是:
First-chance exception at 0x7652C41F in vstest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0015F6A4.
Unhandled exception at at 0x7652C41F in vstest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0015F6A4.
我原以为会在此处打印“曲速核心突破”消息。我将 Debugging->Output Window->General Output Settings 下的所有选项都设置为 On。
【问题讨论】:
-
@Nick 当然我可以抓住它,但我只想知道在没有被抓住的情况下如何看到消息。调试时肯定有办法这样做吗?
标签: c++ debugging exception visual-studio-2012