在VS2010的断点上冻结所有线程 [英] Freeze all threads on breakpoint in VS2010
问题描述
我正在使用VS2010 Beta 2来调试一些多线程代码。爱并行堆栈等。
虽然我有一个问题:我有一个方法可以被多个线程调用的断点。一旦我打破了断点,我真的想把焦点放在触发该断点的线程上。然而,当我打step时,VS经常切换到另一个线程(比如说我在线程1上停止了,但同时线程2命中我的断点)。
<我知道我可以在线程窗口中手动冻结线程。有没有办法自动执行 - 基本上,一旦我打破了一个断点,冻结除了当前的线程之外的所有线程,直到我点击F-5?
不是我所知道的,但是您可以在逐步执行时禁用断点。
当我担心混淆许多线程我倾向于保持线程窗口打开,并保持线程ID的注释。
I'm using VS2010 Beta 2 to debug some multi-threaded code. Love parallel stacks, etc.
I have a question, though: I have a breakpoint set in a method that may be called by multiple threads. Once I hit the breakpoint, I really want to keep the focus on the thread that triggered the that breakpoint. However, when I hit "step", VS often switches to another thread (say I'm stopped on thread 1, but in the meanwhile, thread 2 hits my breakpoint).
I know that I can manually freeze threads in the thread window. Is there a way to do it automatically -- basically, once I hit a breakpoint, freeze all threads except the current one until I hit F-5?
Not that I'm aware of, however you could disable your breakpoint while you are stepping through.
When I'm worried about confusing many threads I tend to just keep the threads window open and keep a note of the thread id's.
这篇关于在VS2010的断点上冻结所有线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!