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