![](/img/trans.png)
[英]Can I make my C# code stop at breakpoint when Visual Studio debugger is evaluating the value?
[英]How to make the Visual Studio debugger stop when a handled exception occurs in C#
我試圖理解我的C#代碼中拋出異常的原因和位置。 問題是我的所有代碼都在try-catch塊中,因此調試器在發生時不會停止。 有沒有辦法明確告訴它停止?
只需使用Ctrl + Alt + E快捷鍵即可打開例外對話框。 在那里,您可以選擇您希望Visual Studio中斷的任何異常。
在Visual Studio中,單擊Debug菜單,選擇Exceptions,然后選中“Common Language Runtime Exceptions”右側的“Thrown”。
轉到調試,例外......
您可以選擇要中斷的例外情況。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.