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

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!decwrl!cache.crc.ricoh.com!cache!steve
  3. From: steve@crc.ricoh.COM (Stephen R. Savitzky)
  4. Subject: Re: How to debug an OO System
  5. In-Reply-To: laffra@watson.ibm.com's message of 4 Jan 93 20:06:17 GMT
  6. Message-ID: <STEVE.93Jan5110030@styx.crc.ricoh.COM>
  7. Lines: 37
  8. Sender: news@crc.ricoh.com (USENET News System)
  9. Nntp-Posting-Host: styx.crc.ricoh.com
  10. Organization: RICOH California Research Center
  11. References: <1993Jan04.200617.17300@watson.ibm.com>
  12. Date: 5 Jan 93 11:00:30
  13.  
  14. In article <1993Jan04.200617.17300@watson.ibm.com> laffra@watson.ibm.com (C.Laffra) writes:
  15.  
  16.    I am interested in the subject of debugging object-oriented systems.
  17.    I have some questions:
  18.  
  19.      1) does OO make debugging unnecessary?
  20.  
  21. Of course not.  Bugs are possible in any language.
  22.  
  23.      2) If not, how do you debug your OO system?
  24.  
  25. In general, the same way I debug anything else:  insert
  26. instrumentation (usually print statements or the equivalent,
  27. conditional on a global Debug_Mode flag), and observe the results.
  28. I should mention that this is C++.
  29.  
  30. In many cases I use assertions to generate error messages when
  31. something is wrong, thus performing a filtering function.
  32.  
  33. When debugging a library one also has to provide test drivers,
  34. typically with test data coming from a file.
  35.  
  36.      3) If so, what do you miss in existing debuggers?
  37.  
  38. The reason I use the technique above, which involves messing with the
  39. source code, is that existing debuggers usually give too much
  40. information and know too little about the semantics of the program
  41. being debugged.
  42.  
  43. Also, debuggers usually have no way to save instrumentation
  44. (breakpoints, watchpoints, etc.) between iterations of the
  45. edit/compile/debug cycle.  Instrumenting the source gives me this
  46. ability. 
  47.  
  48.      4) Are graphical techniques the answer?
  49.  
  50. No.
  51. --
  52. \ --Steve Savitzky--  \    343 Leigh Ave   \ REAL HACKERS USE AN AXE!
  53.  \ steve@crc.ricoh.COM \ San Jose, CA 95128 \     Free Cyberia!
  54.   \ w: 415-496-5710     \   h:408-294-6492   \ 
  55.    \_________________________________________________________________________
  56.