I try to observe when a member of a class get changed in QTCreator 5.2 but I do not find any relevant function like "watch variable" in Eclipse.
Does anyone know weather there's any alternative way to watch a variable's value changes?
The debugger watches a variable through the content of a storage address, computed at the time the watch condition is set. When the content at the storage address is changed from the value it had when the watch condition was set or when the last watch condition occurred, a breakpoint is set, and the program stops.
Any item of data within a program that a programmer wants to observe when debugging. Watch variables may be viewed while the program runs on its own, is stepped through instruction by instruction or when the program crashes. Setting watch variables is part of the debugging operation in a compiler.
You can use data breakpoints for this. You need:
If the address is displayed in the Locals and Expressions view, you can select Add Data Breakpoint at Object's Address in the context menu to set the data breakpoint.
You can read more here Qt Documentation: Interacting with the Debugger
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