Home > Back-end >  C vs2015 single-step debugging member variables in a class is a bool false, but after the step throu
C vs2015 single-step debugging member variables in a class is a bool false, but after the step throu

Time:11-10

Rt, of which 102 is not a fixed value, restart again will change, as if is considered to be an int type, step through click on it to modify the value of the display is 102, if I change its type to int, then assignment will become abnormal,
Classes in other value is normal, if a bool and int two at the same time, so the int value assignment is abnormal, the bool assignment is normal, but in the use of the if (bool variable), step through display is false, but into the true branch.
Doubt is the problem of file coding, and then I change to gb2312, the breakpoint will not stop at the beginning, then I can just stop, remove and then add

CodePudding user response:

A multithreaded program to lock the lock,

CodePudding user response:

Probably is coding issues, in addition to Chinese annotation, after the superposition of two kinds of cause the compiler to identify the line number of disorders, debug the disorderly jump

CodePudding user response:

reference 1/f, zhao teacher reply:
multi-threaded programs to lock the lock,
no multithreading, breakpoints in the main thread, in the process of start

CodePudding user response:

refer to the second floor jha334201553 response:
code seems to be the problem, in addition to Chinese annotation, after the superposition of two kinds of cause the compiler to identify the line number of disorders, jumping about debugging
not disorderly jump, step is normal, is originally bool type, should be a bOk=false, but now become a bOk=true (120) that, even if set bOk=0, or not,

CodePudding user response:

There is the operation of cross-border coverage? To set breakpoints + data breakpoint debugging see

  • Related