次の方法で共有


The Immediate Window: Design-Time Breakpoints

Keyboard:  CTRL + ALT + I
Menu:  Debug -> Windows -> Immediate
Command:  Debug.Immediate
Versions:  2008,2010
Published:  9/29/2010
Code:  vstipTool0096

 

In vstipTool0095 (https://blogs.msdn.com/b/zainnab/archive/2010/09/28/the-immediate-window-working-with-members-vstiptool0095.aspx) I mentioned that you could do design-time execution of members.  I thought it would be instructive to mention that you can also use this technique to hit breakpoints in your code.

 

For example, if I have an application that has a class with a static method:

image

 

And set a breakpoint on a line of code:

image

 

Then, in design mode, I execute the method from the Immediate Window:

image

 

It will execute the code and stop at the breakpoint ready for me to continue debugging:

image

 

This is an interesting feature of design-time execution you can use to quickly get to an area for debugging.