Reputation: 1378
I'm using visual studio 2012. The problem is when I use breakpoints to debug my code and set specific lines to break on, the breakpoint breaks on the line, but before the line is executed. I need the line to get executed and then break on the line (post execution), so I can see the values assigned, otherwise now I have to add extra line after every breakpoint and break on that line. Any suggestions? Thanks!
Upvotes: 2
Views: 2182
Reputation: 2367
Usually I also use F10 and F11 but when I do this debugging routine several times I just put a semicolumn on the next line and put breakpoint on it. That way the expression before is evaluated and you see all necessary values.
The semicolumn(;
) is empty expression. Something like pass
in python.
Upvotes: 1
Reputation: 18411
Add the break point to the line you are currently breaking and when the execution breaks on that unexecuted line, hit F10. It will execute that line and will still be on break.
Upvotes: 2