How to set a breakpoint in every method in VS2010

后端 未结 6 1171
小蘑菇
小蘑菇 2020-12-31 02:33

I have a bigger (c#) WPF application with n-classes and m-methods. I would like to place in every single method a breakpoint, so everytime i press

6条回答
  •  离开以前
    2020-12-31 02:58

    EDIT: tested only with C++

    I came across this article that shows how to set a breakpoint at the beginning of every method in a class. I've tested it with VS 2010. The basic process (when using Visual C++) is:

    1. Go to Debug > New Breakpoint > Breakpoint at Function (Ctrl + B).
    2. In the Function field, insert MyClass::*
    3. This will show up as a single breakpoint in the Breakpoints window, but as soon as one of MyClass's methods is hit, you'll see a breakpoint at the beginning of every function in MyClass, and all of these will be "children" of the original breakpoint in the Breakpoints window.

    I imagine this works with C# as well.

提交回复
热议问题