Can I set a breakpoint like below (the asterisk symbolises the breakpoint dot)?
var x = ifThis ?
* This() :
That() ;
Environment is C# and Visual Studio 2015.
(I just told a colleague that I was possible but seem to stand corrected)
For Windows 8, the debugger and the Windows compiler have been enhanced so that you can debug optimized code and debug inline functions. The debugger displays parameters and local variables regardless of whether they are stored in registers or on the stack. The debugger also displays inline functions in the call stack.
GDB displays inlined functions just like non-inlined functions. They appear in backtraces. You can view their arguments and local variables, step into them with step , skip them with next , and escape from them with finish . You can check whether a function was inlined by using the info frame command.
You can also select the line and then select F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert Breakpoint. The breakpoint appears as a red dot in the left margin next to the line of code. The debugger suspends execution just before the line runs.
Right-click the breakpoint symbol and select Conditions (or press Alt + F9, C). Or hover over the breakpoint symbol, select the Settings icon, and then select Conditions in the Breakpoint Settings window.
You can only place the breakpoint in the whole line.
However, you can:
Press F11
while debugging to enter the line and see which function was hit;
Add a conditional breakpoint so it will only break in the specified conditional; This is the closest to what you want, and have no practical difference on setting the break point on only one part of the expression, other than the full line being marked in VS.
To add a conditional breakpoint, first set the breakpoint, then right click the red dot on the left -> "Condition..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With