I am using Visual Studio 2010, and I know this feature is available in C++.
I need to debug some code, that changes a variable to several values. I want to debug the
In VisualStudio Code, you can set conditional breakpoints as follows:
Click in gutter to create a red-dot breakpoint
Choose Debug from left-side toolbar (icon: circle-slash over bug)
There are four sections: Variables, Watch, Call Stack and Breakpoints
Expand Breakpoints section so you can see the breakpoints
Right-Click on the desired breakpoint
Choose Edit Breakpoint...
Set your condition and press
myvar == 1234
or
'stophere' in myvar
etc
References:
https://code.visualstudio.com/docs/editor/debugging#_conditional-breakpoints