home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18656 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.5 KB  |  62 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!creiman
  3. From: creiman@netcom.com
  4. Subject: Re: Whip me, beat me, what to do with DISCIPLINE?
  5. Message-ID: <1992Nov19.180531.4442@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. References: <1992Nov19.011329.23589@bnr.ca>
  8. Date: Thu, 19 Nov 1992 18:05:31 GMT
  9. Lines: 51
  10.  
  11. brunner@crchh447.bnr.ca (James Brunner) writes:
  12.  
  13. >Ahh, the title caught your eye!
  14.  
  15. Yes, it did. Nice work.
  16.  
  17. >I'm trying to get discipline to work.  I have figured out that macsbugs (which
  18. >I've used quite a bit) must be in the system folder.  I've put discipline in
  19. >the extensions folder.  And put the discipline startup file in the system
  20. >folder.
  21.  
  22. You've already screwed up by assuming Disipline is worth using. In all my
  23. days, the only thing Disipline has taught me is that the Finder is using
  24. SetRect wrong. Zippity-do-da. But if you must plow ahead:
  25.  
  26. 1) Don't use D. the way they tell you to. Instead, change its type to 'APPL'.
  27.    Take it out of the system folder, you've probably got enough junk there
  28.    anyway.
  29.  
  30. 2) Reboot, so you don't have it installed. Now, just double click on the
  31.    D. application. Make sure there is a startup file in the same directory
  32.    as D. itself. D. will install (but not activate) itself. The nice
  33.    part about this is you can just quit D. when your done.
  34.  
  35. 3) Go into Macsbug at the appropriate time and do the 'DSC ON' stuff. 
  36.    If you want to get fancy, you can bracket the code you want to test
  37.    with DebugStr's to activate and deactivate D.
  38.    
  39. 4) Realize you've been wasting time. Go buy TMON Pro or Jasik's Debugger,
  40.    since they both do a better job at discipline than Discipline. Or,
  41.    try your app under EvenBetterBusErr, Xap handles, Blat, or heap 
  42.    scrambling. Unlike Discipline, these have all proven their worth.
  43.    (Leaks is pretty good too).
  44.  
  45. 5) Another good technique is to extend the Xap handles concept one
  46.    step further. Xap handles only stuffs a block with junk after you
  47.    free it up. This doesn't catch uninitialized data structures. You
  48.    can modify your program's memory allocator to stuff new blocks with
  49.    bus error values when first allocated. This usualy catches lots of
  50.    bugs for me. I think Jasik's will do this for you.
  51.  
  52. Sorry for rambling on. Debugging is something I do far too often, and
  53. simple techniques like EBBE, et al can save much gnashing of teeth in
  54. the long run.
  55.  
  56. Chao,
  57.  
  58. Charlie.
  59. -- 
  60. Charlie Reiman
  61. creiman@netcom.com
  62.