I was lamenting that we haven't really done terribly much to make multi-threaded debugging easier in say the last decade and I was fortunate enough to be able to have a conversation with Brain Crawford about it. Brian is a long-time friend an colleague, we worked on the VC++ debugger years ago, he's the lead architect for all things debugger these days. Anyway, he gave me this succinct information about VS2010 and was kind enough to allow me to share it with you all. In his own words Brian writes:While I agree that there is more we could do to make multi-threaded debugging even better, VS 2010 has a number of features that help with multi-threaded debugging for both native and managed code:
Read more: Rico Mariani's Performance Tidbits
- Stepping has affinity with the thread being stepped. Whatever thread is active (has the yellow IP marker next to it in the Threads window) will be stepped and no other threads will complete the step started on that thread. However, by default, breakpoints will fire on any thread, so you can step one thread and hit a breakpoint on another.
- Any time you started execution (step or go) on a thread and execution stops on another thread (e.g. you hit a breakpoint or exception), there will be a small blue marker overlaid on the yellow IP arrow shown in source code to indicate a thread switch occurred.
- Per thread breakpoints can be created by setting a breakpoint and then right clicking on the breakpoint glyph and choosing Filter. In the Filter dialog, you can enter an expression like “ThreadId=5” to restrict the breakpoint to a particular thread.
Read more: Rico Mariani's Performance Tidbits
0 comments:
Post a Comment