When debugging complex software control flows and interactions, it can be difficult to log exactly the right level of detail to capture the bug. Consequently, a debug cycle can go through dozens-to-hundreds of recompiles and restarts as a programmer attempts to set up logging with sufficient granularity to capture the bug, which adds to the cost and complexity of software development.
Per the techniques described herein, debug components such as a state machine, a ring buffer, etc., are incorporated into a program such that log statements can be enabled or disabled at runtime depending on various states across modules of the program. Via a debugging environment, a programmer can reconfigure the state machine at runtime, enabling efficient handling of debug-logging based on program events. With little or no loss to program speed, the techniques enable a programmer to increase the number of log statements without increasing clutter in the debug-log, modify log generation at runtime, examine program states prior to certain program events or triggers, reduce the number of program recompilations/restarts, and reduce or eliminate the use of global variables for debugging.
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.
Phoenix, Christopher J., "Runtime-configured state-machine control of program logging", Technical Disclosure Commons, (September 04, 2019)