This is just a simple trick that many of you might have been using. It's a small but very powerful tip, especially helpful when you are debugging a large code base. This is the concept of Breakpoint Conditions. As the name itself suggests, it is setting the breakpoints that are hit, only when a certain condition is met. It's easy to implement as well. Create a new application and set a normal breakpoint. So this will be hit every time the Page_Load executes. This could be very annoying when you are debugging and it continues to hit this breakpoint. So let's make it conditional. Simply put your mouse on the breakpoint, right-click and select "Condition".This will open up a window where we can define a condition to hit the breakpoint only when the condition is met. You can even get the intelligence (Intellisense?) help for it.See how the color of the breakpoint changes with a plus sign on it. Also, hover over it and you can see the details.Now let's run the application. The first time, no breakpoint is hit. Press the button for postback and see the breakpoint breaks the execution.You can even set this condition to be on your variables or properties and so on. So happy debugging now!
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: