Home > Archive > Visual Studio > May 2006 > How to set break on change of class object member in VC6
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to set break on change of class object member in VC6
|
|
|
| Hi,
How do I get VC6 to break on change of a class object member.
It seems to work only on simple variables.
I've tried:
int * pVar; // Global
// When object instantiated:
pVar = &pObject->nVarToWatch;
// Break expression is '*pVar'
Debugger seems to not monitor *pVar until it breaks at another point, when
the following appears in the debug tab:
DBG: Break command failed within 3 seconds.
DBG: Potential deadlock. Soft broken.
Works ok if break expression is 'pVar' but fails when break expression is
'*pVar'.
Thanks,
Jan
| |
| Phil Cairns 2006-05-26, 4:07 am |
| Jan M wrote:
> Hi,
>
> How do I get VC6 to break on change of a class object member.
>
> It seems to work only on simple variables.
>
> I've tried:
>
> int * pVar; // Global
>
> // When object instantiated:
>
> pVar = &pObject->nVarToWatch;
>
> // Break expression is '*pVar'
On the odd occasion I've needed to do this, I find the address of the
object when it is constructed (say it's 0x00123456). Then in the
breakpoint, I say the thing to watch is ((MyClass*)0x00123456)->nVarToWatch.
Phil.
|
|
|
|
|