home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!psinntp!bony1!richieb
- From: richieb@bony1.bony.com (Richard Bielak)
- Subject: Re: How to debug an OO System
- Message-ID: <1993Jan5.140757.25649@bony1.bony.com>
- Keywords: OO, debugging
- Organization: multi-cellular
- References: <1993Jan04.200617.17300@watson.ibm.com>
- Date: Tue, 5 Jan 93 14:07:57 GMT
- Lines: 48
-
- In article <1993Jan04.200617.17300@watson.ibm.com> laffra@watson.ibm.com (C.Laffra) writes:
- >I am interested in the subject of debugging object-oriented systems.
- >I have some questions:
- >
- > 1) does OO make debugging unnecessary?
-
- Ha! I wish!
-
- > 2) If not, how do you debug your OO system?
-
- I've been using Eiffel 2.3 from ISE, which has a rather primitive
- post-mortem kind of a debugger (it's actually a little bit better than
- a plain post mortem debugger, but not much).
-
- Anyway, the first step is test one class at a time. This may involve
- writing some throw-away code. In Eiffel, I can usually test a single
- class directly from the debugger, as the debugger allows execution of
- single routines.
-
- The most important debugging facility in Eiffel is the assertion
- mechanism (i.e. pre- and post- coditions for routines and invariants
- for classes). During testing all assertions are verified at runtime.
- Assertion failures are a lot easier to fix, as the crash usually
- occurs closer to where the problem is, and you can see what assumption
- was violated.
-
- > 3) If so, what do you miss in existing debuggers?
-
- There is plenty of stuff missing from the Eiffel 2.3 debugger (eg.
- breakpoints, single line stepping, etc) , but that's about to change
- "real soon now (tm)", when Eiffel 3.0 is released.
-
- > 4) Are graphical techniques the answer?
-
- Hmm. It might be nice for the debugger to display the objects and show
- in which object the flow of control is. When a program contains many
- object of the same type, it's sometimes hard to tell in *which* object
- a routine was executing when it failed.
-
-
- ...richie
-
-
- --
- * Richie Bielak (212)-815-3072 | *
- * Internet: richieb@bony.com | Rule #1: Don't sweat the small stuff. *
- * Bang {uupsi,uunet}!bony1!richieb | Rule #2: It's all small stuff. *
- * - Strictly my opinions - | *
-