Re: Debuging by value

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jason (mite51_at_hotmail.com)
Date: 10/01/04


Date: Thu, 30 Sep 2004 21:01:37 -0700

You are correct, sort of. By that I mean that if I were not using an
accessor it would be a problem of inadequate design. In this case however I
am using a class and property accessor that is very frequently used. The
problem is I want to know when a specific instance of a classes specific
value has changed, which is the real power of debugging by value (another
big one is catching memory leaks ). Also the problem is that the property in
question is a sealed microsoft class ( GraphicsPath ) and I have no way of
putting a break point exactly where I want it, tho I do have accessors to
access those accessors.

Jason

"Arjang" <nospam@me.com> wrote in message
news:e3Ju0a2pEHA.192@tk2msftngp13.phx.gbl...
> Please excue my ignorance, but if the changing points
> of data are well defined ( e.g. using OOP's properties or just set and get
> methods) why would there be a need to this type of debugging?
> This type of problem belongs to users of Global Variables.
> Please correct me if I am wrong
>
> "Bob Grommes" <bob@bobgrommes.com> wrote in message
> news:OwhYvS2pEHA.708@tk2msftngp13.phx.gbl...
> > Jason,
> >
> > You've touched on one of my few gripes about C#.
> >
> > Inexplicably, C# does not support data breakpoints. I was astounded
that
> > such an incredibly useful capability is absent in C# when it's been
> > supported by other Microsoft debuggers for years (FoxPro, for instance).
> >
> > Actually the debugger seems rather lame in evaluating expressions
> > generally. Frequently, perfectly valid expressions (often easy ones,
such
> > as someString.Length > 0) are rejected by the debugger. This needs
> > fixing.
> >
> > In the meantime you just have to kludge this sort of thing into your
code:
> >
> > #if DEBUG
> > if (Debugger.IsAttached == true && someCondition == true) {
> > Debugger.Break();
> > }
> > #endif
> >
> > --Bob
> >
> > "Jason" <Jason@mobiform.com> wrote in message
> > news:eNMMyM1pEHA.516@TK2MSFTNGP09.phx.gbl...
> >> In the c++ debugger I could give it a memory address of some data and
it
> >> would break when that data changed. It is very helpful when you have a
> >> single value change of a large amount of code and you just want to know
> >> what/where/why its changing. I tried to hook it up like I in C++,
opening
> >> up
> >> the new break point window, going to the data tab and supplying a
> >> pointer...
> >> just for fun I put in the var name ( since there are no pointers in
c# )
> >> hit
> >> ok and I got the message.
> >>
> >> "C# does not support Data Breakpoints"
> >>
> >> Is there some other way of achieving the same task? Like I said it is
> >> immensely helpful in some debugging situations, usually the worst
> >> situations.
> >>
> >>
> >
> >
>
>



Relevant Pages

  • Re: Slot accessors and syntax
    ... everything is an object of some sort. ... It just so happens that some generic functions are used to implement ... via slot accessor functions. ... It can look a bit silly when using subclasses with different ...
    (comp.lang.lisp)
  • Re: Implementing Binary Comparisions for a class objects
    ... store data. ... - A simple excel SORT is impossible in this situation. ... data in a proper structure on the client side. ... > could write an accessor class which would return a value from an object, ...
    (microsoft.public.excel.programming)
  • Re: private fields of component show up in debugger
    ... For the accessor of class(such as ... private, protected, public), they will restrict the accessibility of class ... members in program(from other classes in same assembly or from other ... debugging tools will directly inspect the runtime program's memory to get ...
    (microsoft.public.dotnet.framework)
  • Re: CLOS Question - Making an object a constant
    ... With further debugging, I was able to resolve the problem. ... function and I had forgotten that it destructively modifies the list. ... :accessor to a:reader didn't help. ...
    (comp.lang.lisp)