I have some hash table that is losing its values at some point in the debug session.
My question is, is there any good way to inspect variable (it’s inside singleton)
throughout the debugging session, even if i pass its class’ scope? I want to see in which point
it’s losing its value.
I have some hash table that is losing its values at some point in
Share
You can see a variable by its address. For example:
class A { public: A() { n1 = 1; n2 = 2; } int n1; int n2; }; void f1() { static A a; }Set breakpoint in f1 and see a variable address:
&a 0x00418160 a {n1=1 n2=2}Now you can add this watch:
(A*)(0x00418160) 0x00418160 a {n1=1 n2=2}This watch is available from any place in the program.