I was a bit puzzled to find out how many people overlook the conditional breakpoints in Visual Studio. They usually settle with just setting a regular breakpoint, and then F5-ing their way until the program enters a specific state they are after. Sure, it gets the job done, but it makes your debugging experience worse, and since Visual Studio has so many tools that you can use when debugging, you have no excuse for having a miserable debugging experience (except when you debug distributed systems, then you just suffer :) – well, not really, I am stretching it a bit)
However, this is how you set a conditional breakpoint:
- add a breakpoint as you usually do
- then right click the breakpoint indicator and select Condition
- Most of the few people who reach this point will stop here, having the same question in their mind, why no intellisense?
- The answer: Ctrl + Space, if you press the magic key combination when you type your condition, you will bring up intellisense
- These features have been in place since forever, however people seem to have overlooked them, even though they greatly improve the debugging experience