Hi, Console Application? the old adage is: "When in Doubt, Print more Out". The Macro's
__LINE__
and
__FILE__
are realy handy there. Write a Dump Function, and do something like:
Dump(__FILE__,__LINE__,"Still Alive")
That is how you narrow down problems. You know your code, because you wrote it. It is hard to see how an Intellitrace debugger can have a better idea about what you wanted to write in the first place than that you can have. (It could work well in those highly structured Wizzard ridden area's such as Web Matrix. There the Author has no notion of what was written on his behalf, the only thing known to him there is what he wanted to achieve. Commandline Programs? Not very likely Candidates for that technology. When it trashes, you can narrow down where it happens. Also, occasional trashing tends to happen in retail code. Not much code is tested long enough in debug mode to catch an occasional trashing. Even MS Word trashes occasionally, and that is also not always a software issue of your making. Anyway, Debuggers don't work very well with retail code. LogFiles Do! Also, You Don't need to log in Text, You can create your own logging format, plus a (windows) app that can read and display the info. If your code is perfect, but on occasion Windows trashes it anyways, there is little you can do (apart from re-writing Windows) However, What are the Consequences of trashing. Did the User loose their input(inconvenience) or was an entire network or database crashed(Unmitigated Disaster). The former, Let it Go, if it is infrequent. The Latter: write your software mindfull of this, and be aware of the transaction technology you implement or wrote. Hope this is Helpful, :)
Bram van Kampen