PC Review


Reply
Thread Tools Rate Thread

debugging at class level ??

 
 
Chris Peeters
Guest
Posts: n/a
 
      2nd May 2007
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




*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      2nd May 2007
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Chris Peeters" wrote:

> 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
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      2nd May 2007
Hi,

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

"Chris Peeters" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      2nd May 2007
On May 2, 11:26 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.com> wrote:
> 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.

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      2nd May 2007
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.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Andy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On May 2, 11:26 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
> laceupsolutions.com> wrote:
>> 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.
>



 
Reply With Quote
 
Peter Duniho
Guest
Posts: n/a
 
      2nd May 2007
On Wed, 02 May 2007 09:30:04 -0700, Nicholas Paldino [.NET/C# MVP]
<(E-Mail Removed)> wrote:

> 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
 
Reply With Quote
 
Peter Duniho
Guest
Posts: n/a
 
      2nd May 2007
On Wed, 02 May 2007 10:00:52 -0700, Peter Duniho
<(E-Mail Removed)> wrote:

> 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.
 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      2nd May 2007
Hi,

"Nicholas Paldino [.NET/C# MVP]" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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.


 
Reply With Quote
 
Chris Peeters
Guest
Posts: n/a
 
      3rd May 2007
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


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging is not supported under current trust level settings (??) dgk Microsoft ASP .NET 0 14th Dec 2006 06:14 PM
trust level debugging Matthew David Microsoft ASP .NET 0 11th Nov 2005 03:39 PM
instantion of class at class level or in new()? msnews.microsoft.com Microsoft VB .NET 10 28th Jul 2005 03:04 PM
Trouble debugging: unknown function name in table-level validationexpression mog Microsoft Access Database Table Design 2 30th May 2005 03:02 AM
Structure Declaration (class level or proc level) Cybertof Microsoft C# .NET 2 8th Oct 2003 11:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.