Visual Studio 2017 (suddenly) destroys all exceptions. This means that if I deactivate them in the exception settings (by pressing CTRL + ALT + E during debugging), the debugger still breaks. I do not know if this is just a VS error that I cannot change, and therefore I have to live with it, or is there a simple solution for this.
This is the exception settings window: 
and this VS exception breaks down into: 
By the way, I also tried this lovely minus (nothing happens if I click on it) or added an impossible condition (VS was still breaking the exception).
I also tested the other exceptions (just throwing them away) that I had previously deactivated, and they were also thrown, and I tested the same problem in other projects, where it also appeared: 
In fact, I even put all the stuff in 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 does not appear in other development environments (for example, Rider) on my PC and does not appear on other PCs in VS. This did not always happen on my PC, it only started recently and only in debug mode. And if I continue execution (using F5), it just continues normally.
EDIT When I put a try-catch inside the stream, it behaved a little differently (sorry to post pictures here, but I think that in this case they are more expressive): 
Can anyone explain this behavior?
EDIT It seems normal for ThreadAbortExceptions to interrupt again at the end of the catch statement. However, VS should not violate this exception anyway.
debugging c # visual-studio winforms visual-studio-2017
Metacolon
source share