More about breakpoints

During debugging processes, breakpoints are used normally to halt execution at a particular point( most of the times, to see the values of the variable i.e. to check them if they are right ). But we can do something more to make our break points intelligent. If you are working on Visual studio, the following tips can help you make optimal use of breakpoints :- 1: If you have made changes in your code but want to execute the breakpoint. Right click on the breakpoint & click on Location. There is option in the dialog box “Allow source code to be different from the original version” check that, then your breakpoint will be hit. ( Remember the changes you have done will not be executed, only the compiled code will be executed ) 2: If you want that your breakpoint is to be hit only when the certain condition is met then right-click on the breakpoint & click on Condition. Put your condition there. There are two check boxes check as per your need. ( if you want breakpoint to be hit only when the condition is true,then use ( is true ) or if you want breakpoint to be executed when that condtion changes, then choose ( has changed).

e.g. variable == value , check the relative hasChanged or IsTrue condition the breakpoint will be hit only when that condition is met

3: If you want that your breakpoint is to be hit only when the certain Hit count is reached then right-click on the breakpoint & click on Hit Count. One can use that breakpoint to break always, or can modify the hit count according to his need. e.g. Break when hit count is equal to “some value”. will break only when the hit counts for that breakpoint is equal to “some value” 4: If you want to decide, what to do when your breakpoint is hit, then Right click on the breakpoint & click on When Hit.In that dialog box one can choose, what to do when a breakpoint is hit.

e.g. You only want to check certain values of the variable, when a break point is hit and want your program to run continously then check Print a message and check on continue execution. ( To use your own variable write your variable as {variable} in the text box).

150 150 Burnignorance | Where Minds Meet And Sparks Fly!