Patent attributes
A thread-safe debugging system and method including a thread-safe debug service library and a thread-safe remote control library residing on at least one client computer system. The client and server libraries provide APIs which allow multi-threaded applications executing on the client computer system to take advantage of debug services in a thread-safe and dynamic manner. The remote control library provides third party applications the capability to initiate and manage the debug services on the client dynamically and remotely. The debug services may include providing debug output, listing the one or more debug objects in the multi-threaded application, listing the state of each debug object, turning on or off any debug object by name or pattern, directing the debug output to a remote location, allowing multiple remote diagnostic applications to view the debug output of the application, and logging statistical or performance information. The debug print function provides debug output for one or more threads of the multi-threaded application such that the debug output of each thread remains distinct from the debug output of the other threads. Thread safety may be ensured through the use of thread-safe mechanisms such as locks.