Gor*_*man 16 c++ debugging exception visual-studio-2012
有没有办法从未处理的异常中查看解释性字符串?我正在使用Visual Studio 2012 Express,似乎无法找到方法来查看它.
当我运行以下代码时:
#include <stdexcept>
int main(int argc, char* argv[])
{
throw std::runtime_error("warp core breach");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我在输出窗口中得到的是:
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.
Run Code Online (Sandbox Code Playgroud)
我本来期望在那里打印"warp core breach"消息.我将调试 - >输出窗口 - >常规输出设置下的所有选项设置为开.
Bre*_*hns 20
当抛出异常时,您将获得一个窗口,其中包含break/continue/ignore选项.复制并粘贴此对话框报告的十六进制地址,然后单击break按钮.现在在监视窗口中,输入类似于:(std::runtime_error*)(0x002cfbc8)在第一列中的单元格中.

| 归档时间: |
|
| 查看次数: |
2642 次 |
| 最近记录: |