debugging at class level ??

  • Thread starter Thread starter Chris Peeters
  • Start date Start date
C

Chris Peeters

hi,

How can one set a conditional-breakpoint not linked to any particular
statement in a method but rather at class level so to speak ?

I'd like to break into debugging mode when e.g. the enabled-property of
a button belonging to a form changes, but not in any particular method.

thank you
Chris
 
Chris,
I doubt there is a way to set this kind of "global breakpoint" that you
describe, but you can look into Debug.Assert as well as the Debugger.Break
method.
Peter
 
Hi,

I don't know of nothing like this. I have never seen a IDE with that
feature.
 
I don't know of nothing like this. I have never seen a IDE with that
feature.

VB6 had this feature. It would break immediately after the line which
changed the watched value.
 
Right, but that isn't what the OP wants. The OP wants to say "any time
any method/property in this class is accessed, break".

The feature in VB allowed you to watch a value, and when it changed,
break.

Two very, very different things.
 
Right, but that isn't what the OP wants. The OP wants to say "any
time any method/property in this class is accessed, break".

Actually, that's not how I read the OP either. While his first paragraph
seems to imply he wants to break "any time any method/property in this
class is accessed", as near as I can tell that's only because he didn't
write it very clearly. His second paragraph makes it pretty clear that
what he really does want is a data-based breakpoint, and while I haven't
looked for that in VS2005, it certainly has been present in previous
versions of that debugger and others. When putting the breakpoint on a
small enough variable, it can even be done using a hardware register,
allowing execution to happen at full speed.

It wouldn't surprise me if this is missing from VS Express, and it *would*
surprise me if it's missing in the retail versions of VS.

Pete
 
It wouldn't surprise me if this is missing from VS Express, and it
*would* surprise me if it's missing in the retail versions of VS.

Just looked. It's there, but not for C# or managed C++ code. Native
only. Doh.
 
Hi,

Nicholas Paldino said:
Right, but that isn't what the OP wants. The OP wants to say "any time
any method/property in this class is accessed, break".

The feature in VB allowed you to watch a value, and when it changed,
break.

Two very, very different things.

This is not what the OP wants, he wants to break as soon as any member of
the class is accesed.
 
Hi,

"it certainly has been present in previous
versions" ... indeed, I used it in VS 6.0 with C++.

But apparently it is not available anymore for managed code.

Anyway, thank you all for taking your time

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top