1. <tfoot id='cqsG5'></tfoot><legend id='cqsG5'><style id='cqsG5'><dir id='cqsG5'><q id='cqsG5'></q></dir></style></legend>

        <bdo id='cqsG5'></bdo><ul id='cqsG5'></ul>
    2. <i id='cqsG5'><tr id='cqsG5'><dt id='cqsG5'><q id='cqsG5'><span id='cqsG5'><b id='cqsG5'><form id='cqsG5'><ins id='cqsG5'></ins><ul id='cqsG5'></ul><sub id='cqsG5'></sub></form><legend id='cqsG5'></legend><bdo id='cqsG5'><pre id='cqsG5'><center id='cqsG5'></center></pre></bdo></b><th id='cqsG5'></th></span></q></dt></tr></i><div id='cqsG5'><tfoot id='cqsG5'></tfoot><dl id='cqsG5'><fieldset id='cqsG5'></fieldset></dl></div>

      <small id='cqsG5'></small><noframes id='cqsG5'>

      1. VS 17 打破所有异常

        VS 17 breaking on all exceptions(VS 17 打破所有异常)

        <i id='JPspi'><tr id='JPspi'><dt id='JPspi'><q id='JPspi'><span id='JPspi'><b id='JPspi'><form id='JPspi'><ins id='JPspi'></ins><ul id='JPspi'></ul><sub id='JPspi'></sub></form><legend id='JPspi'></legend><bdo id='JPspi'><pre id='JPspi'><center id='JPspi'></center></pre></bdo></b><th id='JPspi'></th></span></q></dt></tr></i><div id='JPspi'><tfoot id='JPspi'></tfoot><dl id='JPspi'><fieldset id='JPspi'></fieldset></dl></div>
          <tfoot id='JPspi'></tfoot>
        • <legend id='JPspi'><style id='JPspi'><dir id='JPspi'><q id='JPspi'></q></dir></style></legend>
              <bdo id='JPspi'></bdo><ul id='JPspi'></ul>
                  <tbody id='JPspi'></tbody>

                  <small id='JPspi'></small><noframes id='JPspi'>

                  本文介绍了VS 17 打破所有异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  Visual Studio 2017 (有点突然)打破了所有异常.这意味着,如果我在异常设置中停用它们(在调试时按 CTRL + ALT + E),调试器仍然会中断它们.我不知道这只是 VS 的一个错误,我无法更改因此必须忍受,或者是否有一个简单的解决方案.

                  这是异常设置窗口:

                  这个异常VS中断:

                  顺便说一句,我还尝试了那个漂亮的减号(如果我按下它什么都不会发生)或添加一个不可能的条件(VS 仍然在异常中中断).

                  我还测试了其他异常(通过简单地抛出它们),我之前禁用了它们,它们也被抛出,我在其他项目中测试了同样的问题,它也出现了:

                  实际上我什至把所有的东西都放到了 try catch 语句中,但 VS 还是会中断:

                  InitializeComponent();尝试{var t = 新线程 (() =>{while (!IsHandleCreated) {}//它在这里中断(类似于屏幕截图)而(真)Invoke (new Action (() => Size = new Size ()));});而(真){t.开始();线程.睡眠(100);t.Abort();}}捕捉(线程中止异常){}

                  它不会出现在我 PC 上的其他 IDE(如 Rider)中,也不会出现在 VS 中的其他 PC 上.它并不总是发生在我的电脑上,它最近才开始并且仅在调试模式下.如果我继续执行(使用 F5),它就会正常继续.

                  编辑当我将 try catch 放在线程中时,它的行为有点不同(我很抱歉在这里放了图片,但我认为在这种情况下它们更具表现力):

                  任何人可以解释这种行为吗?

                  EDIT ThreadAbortExceptions 在 catch 语句结束时再次中断似乎是正常的.但是,VS 仍然不应该在这个异常上中断.

                  解决方案

                  我遇到了类似的问题.

                  我通过在工具>选项>调试>常规中取消选中当异常跨越AppDomain或托管/本机边界时中断"来修复它

                  Visual Studio 2017 is (kind of suddenly) breaking on all exceptions. That means, if I deactivate them in the exceptions settings (pressing CTRL + ALT + E while debugging), the debugger still breaks on them. I don't know wether this is just a bug of VS I can't change and therefore have to live with, or wether there is a simple solution for it.

                  This is the exception settings window:

                  and this the exception VS breaks on:

                  By the way, I also tried that beautiful minus (nothing happens if I press it) or adding a impossible condition (VS still broke on the exception).

                  I also tested other exceptions (by simply throwing them), which I deactivated before, and they get thrown as well and I tested the same issue in other projects, where it appeared as well:

                  I actually even put the whole stuff into a try catch statement but VS still breaks:

                  InitializeComponent ();
                  try
                  {
                      var t = new Thread (() =>
                      {
                          while (!IsHandleCreated) {} //It breaks here (similiar to the screenshots)
                          while (true)
                              Invoke (new Action (() => Size = new Size ()));
                      });
                      while (true)
                      {
                          t.Start ();
                          Thread.Sleep (100);
                          t.Abort ();
                      }
                  }
                  catch (ThreadAbortException) { }
                  

                  It doesn't appear in other IDEs (like Rider) on my PC and doesn't occurr on other PCs in VS. It didn't always occurr on my PC, it just started recently and only in debugging mode. And if I continue the execution (with F5) it just continues normally.

                  EDIT As I put the try catch inside the thread it behaved a little bit different (I'm sorry for putting pictures in here, but I think they're more expressive in that case):

                  Can anybody explain this behaviour?

                  EDIT It seems to be normal for ThreadAbortExceptions to break again at the end of a catch statement. However, VS still shouldn't break on this exception at all.

                  解决方案

                  I was having a similar problem.

                  I fixed it by unchecking "Break when exceptions cross AppDomain or managed/native boundaries" in Tools > Options > Debugging > General

                  这篇关于VS 17 打破所有异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean(强制 JsonConvert.SerializeXmlNode 将节点值序列化为整数或布尔值)
                  Using JSON to Serialize/Deserialize TimeSpan(使用 JSON 序列化/反序列化 TimeSpan)
                  Could not determine JSON object type for type quot;Classquot;(无法确定类型“Class的 JSON 对象类型.)
                  How to deserialize a JSONP response (preferably with JsonTextReader and not a string)?(如何反序列化 JSONP 响应(最好使用 JsonTextReader 而不是字符串)?)
                  how to de-serialize JSON data in which Timestamp it-self contains fields?(如何反序列化时间戳本身包含字段的JSON数据?)
                  JSON.Net custom contract serialization and Collections(JSON.Net 自定义合约序列化和集合)

                • <small id='rAdD2'></small><noframes id='rAdD2'>

                  <i id='rAdD2'><tr id='rAdD2'><dt id='rAdD2'><q id='rAdD2'><span id='rAdD2'><b id='rAdD2'><form id='rAdD2'><ins id='rAdD2'></ins><ul id='rAdD2'></ul><sub id='rAdD2'></sub></form><legend id='rAdD2'></legend><bdo id='rAdD2'><pre id='rAdD2'><center id='rAdD2'></center></pre></bdo></b><th id='rAdD2'></th></span></q></dt></tr></i><div id='rAdD2'><tfoot id='rAdD2'></tfoot><dl id='rAdD2'><fieldset id='rAdD2'></fieldset></dl></div>
                  <legend id='rAdD2'><style id='rAdD2'><dir id='rAdD2'><q id='rAdD2'></q></dir></style></legend>
                    <tbody id='rAdD2'></tbody>

                        <bdo id='rAdD2'></bdo><ul id='rAdD2'></ul>
                        1. <tfoot id='rAdD2'></tfoot>