Visual studio曾经有一个特定的复选框来打破未处理的异常。在2015年,这已被删除(或移动到我找不到的地方)。所以现在如果我无法提供一个用户级的异常处理程序,我的转换的项目不再破坏。我不想打破所有抛出的异常,因为我处理具体的。只是在那里我不能提供一个特定的处理程序。
现在我的代码只是退出当前的过程,并在下一个调用堆栈位置继续执行,不好。
任何人都知道如何在Visual Studio 2015中得到这个回报?我刚刚升级到社区版。
解决方案有一个名为异常设置的新窗口出现在右下方的窗格中默认开始调试时。它具有您期望的所有选项。
您可以使用 CTRL + ALT + E
这允许您选择哪些异常导致调试器中断。
关键在于,您还可以设置这些异常是否总是中断,或者只是在未处理的异常时中断,但设置不是很直观。您需要先在工具>选项>调试下检查启用我的代码。
这样就可以右键单击列标题在新的异常设置窗口中,并添加附加操作列,然后允许您将每个异常设置为在用户代码中未处理时继续。
此处更多:
blogs.msdn/b/visualstudioalm/archive/2015/02/23/the-new-exception-settings-window-in-visual-studio-2015.aspx
Visual studio used to have a specific checkbox to "Break on Un-handled exception". In 2015 this has been removed (or moved somewhere I cannot find it). So now my converted projects no longer break if I fail to provide a user-level exception handler. I don't want to break on all "thrown exceptions" because I handle specific ones. Just where I fail to provide a specific handler.
Right now my code simply exits the current procedure and continues execution at the next call stack location, NOT GOOD.
Anyone know how to get this back in Visual Studio 2015? I just upgraded to the community edition yesterday.
解决方案There's a new window called "Exception Settings" that appears in the lower right pane by default when you begin debugging. It has all of the options you would expect.
You can bring it up with CTRL+ALT+E
This allows you to cherry-pick which exceptions cause a break in the debugger.
The key, though, is that you can also set whether these exceptions always break, or only break when it's an unhandled exception -- but setting this is not very intuitive.
You will need to first check "Enable Just My Code" under Tools > Options > Debugging.
This then allows you to right-click the column header (Break When Thrown) in the new Exceptions Settings window, and add the "Additional Actions" column, which then allows you to set each exception as "Continue when unhandled in user code".
blogs.msdn/b/visualstudioalm/archive/2015/02/23/the-new-exception-settings-window-in-visual-studio-2015.aspx
更多推荐
Visual Studio 2015打破未处理的异常不起作用
发布评论