The mechanism to take debugging into a new thread from the main server code
Debugger Design
bugMe statements give the debug message to the bugMe procedure along with the type of message by means of an ID code.
bugMe procedure works out who is passing it the information to be debugged, know as the caller.
It then takes the caller, debug message and the message type ID and passes that to the debug Thread asynchronously and returns immediately.
debugThreadInit the debug init process must check
• Which callers we are interested in receiving information from.
• Which types of debug information we want to see.
• If we override the individual caller setting to see all those types of messages from any caller (time saver).
• How we want to process the debug information and to where. File, stdout, stderr, client.
the debugThread then takes the callers name, checks to see if we are interested in that type of information and if an override is in place. The check to see if we are interested in information from that caller. If we are not then we return and do nothing. If we are interested then we process each debug statement as stipulated.