At froglogic, we’re big fans of open source software. A large part of our engineering (and management!) staff contributed or contributes to open source projects, and everyone visiting our offices for a job interview certainly gets a big +1 in case she can show off some open source work! We also use a lot of open source software for our daily work, ranging from obvious projects like Git or the Linux kernel to individual libraries serving very specific purposes; the Acknowledgements Chapter of the Squish manual gives an impression of how tall the giants are upon whose shoulders we’re standing.
Over the last couple of years we contributed back various bug fixes and improvements to different projects we’re using, but we’d like to step things up a little bit. Hence, we now open-sourced an internally developed C++ framework called ‚TraceTool‘ and made it available under the LGPL v3 license on our GitHub account:
TraceTool started out as a project which we did a few years ago but since grew to a full-fledged, efficient and configurable framework which we use ourselves internally in order to aid debugging our software.
The birds-eye view is that the source code of the application or library is augmented with additional statements which generate output reflecting the current state of the application. By default, these statements don’t do anything though – the idea is that they are compiled into the application (and shipped in release builds) but only get activated when a special configuration file is detected at runtime. That configuration file describes
- for which C++ classes, functions or files to enable tracing
- what format to use for the trace output
- whether to log stack traces when individual trace points are hit
- and much more
In addition to the library, the framework provides a GUI as well as various command line tools to view and process the generated traces.
The workflow which inspired this project is that once a user reports a defect of some sort, he gets sent an configuration file to be stored somewhere and that configuration file enables just the right amount of debug output for the developer to understand what’s going on.
We welcome everyone to hop over to the TraceTool repository page, have a look, give it a try – and see whether this might be useful to you. If you feel like it, don’t hesitate to contribute back by submitting a Pull Request so that we can improve things for everyone. 🙂