Derek,
I wouldn't bother writing such a system ("which I plan to do for my next
projects") since I already have one that works quite well. Let me know if you
are interested. It gets around many of the issues with using the debugger and
works well if you accidentally leave the code in your application.
Take care,
Fletcher
Fletcher Johnson
[EMAIL PROTECTED]
408-929-5678 - Cell
408-946-0960 - Work
501-421-9629 - Fax
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Derek Kalweit
Sent: Wednesday, February 07, 2007 2:56 PM
To: [email protected]
Subject: Re: Buffer overruns & stuff
> The source is a VFP cursor created by querying an MSSQL db. My app
> reads from & parses the data in the cursor into native VFP tables
> stored locally. There's no user interface. Crash about every 15min.
If it's that re-creatable, then it's time to start adding trace code,
IMO-- to find where the problem is happening. I use STRTOFILE for
this:
STRTOFILE("Some meaningful string" + CHR(13) + CHR(10), "c:\out.log", .T.)
This will append a line to the c:\out.log file-- change your strings to
something useful to know where in the code it's happening(put it in key spots
right before something you suspect to be the potential
problem-- it can be very high level in the code, especially at first).
You can also write a more robust tracing mechanism, which I plan to do for my
next projects. Basically, you call the function throughout your code, and the
function queries a setting to see if tracing is 'on', and potentially at what
level, and if so outputs it to the text file with a date/time stamp, etc. I've
used it in C++ programs as a debugging mechanism and it's been extremely
valuable. I turn it on with a registry setting. One of the key things I like to
do is add
start:functionname() and end:functionname() things to the beginning and ending
of functions/methods when I write my code initially-- this lets me know very
early on what overall function/method the crash is occuring in...
--
Derek
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.