切换“抛出异常时中断”。使用宏或键盘快捷方式 [英] Toggle "Break when an exception is thrown." using macro or keyboard shortcut

查看:229
本文介绍了切换“抛出异常时中断”。使用宏或键盘快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


编辑:Visual Studio 2015的新异常窗口比旧的对话框要快得多,我不再关心使用键盘
的快捷方式。 / p>

有没有一个宏或键盘快捷方式会在不使用GUI的情况下切换异常抛出时?



使用ctrl + alt + e打开对话框,并检查通用语言运行时异常抛出框,然后单击确定很简单,但这是我做的很多。我宁愿有一个键盘快捷方式。



这个问题与
任何一个Visual Studio快捷键/宏用于在处理/未处理的异常之间切换中断? a>



然而,海报接受了一个并不真正有效的答案,而我真的希望工作的答案。 / p>

重复问题中的答案是不可接受的,因为它仅切换一个特定的异常,而不是整个CLR组。



<那么请先写一个循环。你说。但不是那么快!
有人试过已经它是无用的慢。 (是的,我已经验证了它的系统缓慢)。



所以挑战是使用一个宏来切换整个CLR异常类别小于1或2秒。
这个问题是
的副本任何一个Visual Studio的快捷方式/宏用于切换处理/未处理的异常?

解决方案

我创建了一个可以可靠地执行的免费Visual Studio扩展:异常断点器

它使用非文档化的$ document code> IDebugSession2.SetException 调用非常快:所有异常都设置/未设置在20至60毫秒。


Edit: Visual Studio 2015's new exception window is so much faster than the old dialog that I no longer care as much about using a keyboard shortcut for it.

Is there a macro or keyboard shortcut that will toggle "break when an exception is thrown" without using the GUI?

Opening the dialog with ctrl+alt+e and checking the "Common Language Runtime Exceptions" "Thrown" box then clicking OK is simple enough, but this is something I do a lot. I would rather have a keyboard shortcut for this.

This question is a duplicate of Any have a Visual Studio shortcut/macro for toggling break on handled/unhandled exceptions?

However, the poster accepted an answer that doesn't really work, and I would really like an answer that does work.

The answer in the duplicate question is not acceptable because it toggles only one specific exception, not the entire CLR group.

"Well write a loop then." you say. But not so fast! Someone tried that already and it was uselessly slow. (Yes I've verified that its slow on my system as well.)

So the challenge is to use a macro to toggle the entire CLR Exceptions category in less than 1 or 2 seconds. This question is a duplicate of Any have a Visual Studio shortcut/macro for toggling break on handled/unhandled exceptions?

解决方案

I have created a free Visual Studio extension that can do that reliably: Exception Breaker.
It uses undocumented IDebugSession2.SetException call that is very fast: all exceptions are set/unset in 20 to 60 milliseconds.

这篇关于切换“抛出异常时中断”。使用宏或键盘快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆