简体   繁体   English

Visual Studio 2017中断异常(也处理异常)

[英]Visual studio 2017 break on throw for exceptions (also handled exceptions)

since I am using vs 2017 I am missing one of my most used features I was using in vs 2008 and 2010. In previous Visual Studio versions you were able to setup exception handling. 因为我使用的是vs 2017,所以我错过了我在2008和2010中使用过的最常用功能之一。在之前的Visual Studio版本中,您可以设置异常处理。 VS2010 for expamle: Debug=>Exceptions=> CLR Exceptions => Thrown checkbox VS2010 for expamle:Debug => Exceptions => CLR Exceptions => Thrown复选框

When I checked this checkbox he would break on every exception which was thrown (did not matter if handled or unhandled). 当我选中这个复选框时,他会在抛出的每个异常中中断(如果处理或未处理则无关紧要)。 This was a huge bonus because in bad code were logging was very bad you allways found the issue pretty fast. 这是一个巨大的奖金,因为在糟糕的代码中,记录非常糟糕,你总是发现这个问题非常快。

Now I am working on a project with pretty bad logging and I am getting a lot of exceptions in the output window but not in the log. 现在我正在开发一个日志非常糟糕的项目,我在输出窗口中遇到很多异常,但在日志中却没有。 But I simply can't find the damn code line and the studio debugger is not breaking at the exception. 但我根本找不到该死的代码行,而且工作室调试器没有破坏异常。

I found this this and checked "all exceptions in this list". 我发现了这个并检查了“此列表中的所有异常”。 But it did nothing and the studio just ignored it. 但它没有做任何事情,工作室只是忽略了它。 I am desperately looking for that good old "thrown" features from 2010. It obviously has to be a handled exception. 我迫切地想要从2010年开始寻找旧的“抛出”功能。显然,它必须是一个处理过的例外。 Anyone knows where I find that must have feature in this new fancy studio? 任何人都知道我在哪里找到了这个新的花哨工作室必备的功能?

Best regards 最好的祝福

The provided solution here does work. 所提供的解决方案在这里没有工作。 I did not work in my case because he had and still has issues loading the debug informations of other libraries. 我没有在我的情况下工作,因为他已经并且仍然有加载其他库的调试信息的问题。 If you have similar issues, make sure that he has loaded the necessary debug informations. 如果您有类似的问题,请确保他已加载必要的调试信息。 I am not working with project references because of the project size. 由于项目规模,我不使用项目引用。 We are working with post build events which do copy the output libraries to a common directory which we are refering to as reference path. 我们正在使用post build事件,它将输出库复制到一个公共目录,我们将其称为引用路径。 In my case deleting the libs there and rebuilding them did the job. 在我的情况下删除那里的库并重建它们完成了这项工作。 He loaded the debug informations correct and was able to break even at handled exceptions. 他将调试信息加载正确,并且能够在处理的异常情况下实现收支平衡。

Best regards 最好的祝福

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2013“打破处理的异常”不起作用,而不是破坏 - Visual Studio 2013 “break on handled exceptions” not working, not breaking Visual Studio 2015意外地破坏了处理的异常 - Visual Studio 2015 unexpectedly breaking on handled exceptions Visual Studio:编辑并继续处理已处理的异常? - Visual Studio: edit-and-continue on handled exceptions? 为什么Visual Studio会中断第三方库中引发和处理的异常? - Why does Visual Studio break on Exceptions thrown and handled in a third party library? visual studio 2008保存或备份异常中断 - visual studio 2008 save or backup exceptions to break on Visual Studio 2015打破未处理的异常无效 - Visual Studio 2015 break on unhandled exceptions not working 如何让 Visual Studio 2015 忽略处理的异常? - How do I make Visual Studio 2015 ignore handled exceptions? 如何使Visual Studio将异常抛入NUnit gui? - How to make Visual Studio throw exceptions into the NUnit gui? Visual Studio:代码分析器,以确定方法可以引发哪些异常? - Visual Studio: Code analyzer to determine what exceptions a method can throw? 在Visual Studio中是否有按键来切换所有CLR异常中断,第一次机会? - Is there a keystroke in Visual Studio to toggle break on all CLR exceptions, first chance?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM