C
C
choodo2016-04-10 13:59:41
C++ / C#
choodo, 2016-04-10 13:59:41

How do I set up debugging in VS to watch decrement and increment operations?

#include
void main()
{
int x = 1;
x = x + x++;
printf("%d", x);
scanf_s("%d", &x);
}
When I watch the variable x in the debugger, then on the line x = x + x++; x immediately becomes equal to 3. What to do to see a specific sequence of actions where it became 2, and where 3, if possible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rome Great, 2016-04-10
@ok_rf

I don't think that's possible right now.

M
MiiNiPaa, 2016-04-10
@MiiNiPaa

Only by viewing the generated assembler code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question