How to set a breakpoint in every method in VS2010

后端 未结 6 1187
小蘑菇
小蘑菇 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:59

    This answer suggests a macro that will do as you ask, but my personal recommendation would be to use a profiler instead - one that lets you pause and resume profiling on the fly (nearly all of the commercial profilers do), and then hit the "Start Profiling" button just before you do your button click. Viewing the call tree in the profiler is often a very convenient way of gaining insight into what an application is doing, much more than stepping through in the debugger.

    UPDATE: This feature exists in a Visual Studio extension that I'm working on called OzCode. With OzCode, when you click on the icon next to the class definition, you'll see the QuickAction:

    Add Breakpoint to every member in class

提交回复
热议问题