Did you know… You can use Breakpoint Filters to break the right process - #273

Conditional breakpoints are for breaking at the expression level, when a particular condition is true, like x=5.  But what if you have multiple instances of the same app running?  How do you set to break the instance you want?

The answer is Breakpoint Filters.

Go to Tools – Options – Debugging – General, and there you’ll see the option to enable breakpoint filters.

image

Set a Breaking and Right-click to bring up the context menu.

Breakpoint Filter context menu option

Then in the Filter dialog box, you can specify when to break, for example, per PID (process ID).

image

and now you can verify the breakpoint filter in the Breakpoints window.

Breakpoints window showing breakpoint filter