Giovanni:
Howdy. Wow! That would be a great tool. I simply use a log file to record
important points in my programs' execution. I also usually include a debugging
mode which, when turned on, increases the amount of information written to the
log file. I have encapsulated the entire log file into a class so it is very
easy to use:
public LogFile as clsLogFile
set LogFile = new clsLogFile
' the log file is initialized with the reset method, app.title and
app.hinstance are passed
' so that multiple instances of the same program can record logging info in the
same
' log file, the logfilename is passed so that the developer can use whatever
naming
' convention is desired. The third parameter controls whether the log file
will include
' a time-stamp on each output line.
LogFile.Reset app.title, app.hinstance, LogFileName, True
Sub LogFileExample()
' when you want to record an event to the logfile, use the WriteData method.
The
' optional second parameter lets you create strcutured output.
LogFile.WriteData "START: LogFileExample.", 2
LogFile.WriteData "running LogFileExample"
LogFile.WriteData "END: LogFileExample", -2
End Sub
The previous example would create a logfile that looks something like this
(note that the 0001232 would be the instance handle of the running
application):
******************
0001232 12:32:13 INIT: application title would appear here
0001232 12:32:13 INIT: machine name would appear here
0001232 12:32:14 START: LogFile Example.
0001232 12:32:14 running LogFile Example
0001232 12:32:15 END: LogFileExample
To include optional logging, simply use a globally scoped variable to track the
status of your "debugging mode:"
public enum SystemStates
STATE_DEBUG_MODE
end enum
public SS as SystemStates
To turn on extra logging:
SS = SS or STATE_DEBUG_MODE
To turn it off:
SS = SS and not STATE_DEBUG_MODE
To test for debugging mode:
If SS and STATE_DEBUG_MODE then
LogFile.WriteData "this is only written when debug mode is on"
end if
The class includes several other method, for example, LogFile.View launches
notepad to display the log file.
Since I wrote the class while employed by a software company, I can't give the
class away, but I could probably convince the owner to sell it for a couple of
chris judge
Quote:
> Hello everyone, does someone know how to make remote debugging of a VB
> application (normal 32bit exe)? I explain: I'd like to test an application
> I've done directly on customer installation without installing on
> customer's machine the whole Visual Studio 6.0 IDE. Has someone an idea for
> making out of this?
> Thanks in advance!
> giovanni