GammaRay

GammaRay is a tool for examining the internals of a Qt application and to some extent also manipulate it. GammaRay uses injection methods to hook into an application at runtime and provide access to a wide variety of interesting information. It provides easy ways of navigating through the complex internal structures you find in some Qt frameworks, such as QGraphicsView, model/view, QTextDocument, state machines and more.

GammaRay screenshot

When trying to analyze bugs in your application, the debugger is usually your first tool of choice, and rightfully so. Debuggers allow you to follow the program flow and allow you to inspect the state of objects or variables. When using a debugger with proper Qt integration, such as in Qt Creator, it will also handle Qt’s own data types correctly. However, when dealing with complex frameworks this level of detail might be too low-level. Keeping an overview in a large QGraphicsView scene or following the complex interactions between models and views can quickly become a cumbersome task in a normal debugger.

GammaRay augments your conventional debugger by providing domain-specific debugging aids on a much higher level. It provides easy ways of navigating through the complex internal structures you find in some Qt frameworks, such as QGraphicsView, model/view, QTextDocument, state machines and more. Unlike the debugger, GammaRay understands those internal structures and can present them in a meaningful way.
GammaRay should not be missing in any Qt developer’s toolbox. GammaRay is available both stand-alone and integrated in Qt Creator and allows both inspection of Qt applications right from the start as well as attaching to a running Qt application later on.

There are several other QObject introspection tools available, and of course the usual browsing of object properties, signals, slots and connections is also available in GammaRay, just like in-line displaying of widget boundaries and layouts. However, its real strength comes into play when looking at some of the more complex frameworks provided by Qt.

When working with QGraphicsView (either directly or via Qt Quick), you’ll quickly value having a way to browse the scene graph and the various properties of the individual elements in there. GammaRay assists you in debugging transformation and layouting issues by giving you a second view on the scene graph, that allows free navigation and displays item boundaries, coordinate systems and transformation origins. Most properties cannot just be inspected but also modified directly, so you can try out your improvements before even changing a single line of code.

The Qt model/view framework is another system that benefits immensely from a domain-specific debugging tool. GammaRay allows you to browse the content of any QAbstractItemModel found in your application, no matter if it’s visible in any view or not. It can also display the hierarchy of proxy models as well as any intermediate result in a proxy model chain. Finally, it also allows you to inspect all selection models that are in use on top of any of your models.

While less complex than a QWebPage, a QTextDocument is still complex enough to warrant dedicated tools for analyzing it’s internal tree structure of frames, blocks and fragments down to individual characters. For each document element, GammaRay also allows you to inspect the corresponding format settings.

GammaRay also allows you to observe your Qt state machines in real time and browse their states and transitions.

It’s a little known fact that Qt comes with a number of powerful debugging tools that are hidden inside the code. There’s a full JavaScript debugger hidden in QtScript, and a complete debugging and profiling suite for web application can be found in QtWebKit. GammaRay enables you to use those tools on any Qt application without having to integrate them each time again.

That’s not the end though, GammaRay is available in source code and is designed to be extendable for additional domain-specific debugging aids, be it another framework provided by Qt, a component from another vendor or your own classes.

Get GammaRay

GammaRay is available under a GPL licence and can be downloaded from: http://github.com/KDAB/GammaRay
For commercial support options, please contact .

Mailing lists

KDAB hosts the following mailing lists which are available to anyone interested in GammaRay development.

The lists are:
gammaray-interest
https://mail.kdab.com/mailman/listinfo/gammaray-interest
for anyone who wants to discuss anything related to GammaRay

gammaray-commits
https://mail.kdab.com/mailman/listinfo/gammaray-commits

for anyone who wants to follow commits into the GammaRay git repository