Tips : Set Breakpoint to multiple Functions at a same time in Visual Studio

Visual Studio having great features to set breakpoint in  multiple functions at same time.  For most of the time, to set a breakpoint  with in a function you just put a breakpoint in the first line of the function.  Now, assume you have 10 different overloaded methods or you have same function in different project, and you want to put breakpoint all of them or few of them, then it will take time to put breakpoint in each and every function.  In this post I am going to share two quick tips by which you can set breakpoint to function very easily. first one is by using “Break at Function” and second one by “Using Find Combo Box”.

Advertisements

Tips on Debugging : Using DebuggerStepThrough attribute

In my few previous blog post I have explained  how we can customize the Debugging windows view during debugging of application using “DebuggerBrowseable “  attributes and “DebuggerDisplay” , then I have also explained use of “DubuggerHidden” attribute which tells the Visual Studio debugger that the method is hidden from the debugging process and while debugging. In this blog post I am going to explain one similar features of “DebuggerHidden” attributes, named “DebuggerStepThrough” 

Marking a piece of code using DebuggerStepThrough attribute tells the Visual Studio debugger that, the code block will be stepped over from debugging process. you can mark methods, properties with DebuggerStepThrough attributes where you don’t want to stop your code to break.

If there is any break point inside a code section which is marked as “DebuggerStepThrough” attributes, that code block will be marked as “[External code]” in stack Trace. Where as “Debugger hidden” attributes didn’t marked is External code.

overall