From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: TIP OF THE WEEK Date: 1 Sep 1997 11:12:38 GMT Organization: The National Capital FreeNet Lines: 29 Message-ID: <5ue7v6$1eu@freenet-news.carleton.ca> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet6.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I hope to perhaps make this a frequent, maybe weekly feature of the newsgroup/mailing list. Debugging tips, coding tips, other stuff. Debugging tip: If you have a program that is crashing and add debug instructions to dump info to a file, or to stdout or stderr redirected to a file, and the program hangs or makes the machine reboot, you will probably get an improperly-closed file (what C-64 users used to call a "splat file"). When you go to read your precious debugging data, you'll find it's a zero length file. Never fear: Microsoft Scandisk to the rescue. Run it (DOS or the Win 95 version as appropriate). Don't bother with the surface scan in the DOS one; for the Windows uncheck Thorough, check Standard. When it runs you should get a message about lost clusters. Save them to a file and "skip undo". Now, comb your disk for *.CHK files. For each one found, more it to the screen: more file0001.chk for instance. (If that doesn't work you have a weird/old DOS, and can try more