home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / object / 4711 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.2 KB  |  60 lines

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