Improve your debugging experience in Visual Studio with conditional breakpoints

Software category image

Sick of stepping through loops until your desired data object is found? Use conditions for breakpoints to speed up debugging!

A conditional breakpoint is just a regular breakpoint that interrupts the app process if a condition is satisfied. A regular breakpoint stops every time the compiler passes by. So you have more control over your debugging workflow.

Create a breakpoint by clicking on the first column of your code editor window. Then right-click on the breakpoint and select Insert Conditional Breakpoint. Here you can define a boolean term as a condition, a hit count, or a filter condition to narrow down the number of times the debugger will stop.

Video of conditional breakpoints in Visual Studio by author
Video of conditional breakpoints in Visual Studio by author

A useful tool when you need to step through a loop or when your dataset is big but you are only interested in a specific subset of them.

Find more Visual Studio related articles here


Want More Flutter Content?

Join my bi-weekly newsletter that delivers small Flutter portions right in your inbox. A title, an abstract, a link, and you decide if you want to dive in!