GammaRay - Introspection/Debugging Tool for Qt Applications

Volker Krause vkrause at
Wed Nov 2 20:05:17 GMT 2011

On Tuesday 01 November 2011 21:56:53 Peter K├╝mmel wrote:
> On 01.11.2011 08:58, Volker Krause wrote:
> >> I've also tried to attach to console apps without success.
> >> Then I realized that you use the hijacked process to show
> >> the GammaRay mainwindow which is not possible in a
> >> QCoreApplication executable.
> >> 
> >> So I wonder how difficult it would be to run GammaRay in a
> >> different process? Then an IPC mechanism is needed for all
> >> the information. Would this be fast enough? Do you plan
> >> to add this in future?
> > 
> > I'd love to have that, for console apps, remote debugging on an embedded
> > system, and for less interference with the debugged process :)
> Couldn't you reuse some IPC parts from KDAB's canceled test tool ;)

I'd actually need to check how that worked ;)

Two other tools to look at would be the Qt Creator QML debugger and Qt 
Inspector (both use custom protocols with QDataStream-based serialization 

Another idea that came up for dealing with anything QObject based was to just 
export those objects to D-Bus. That automatically gives you cross-process 
property/signal/slot introspection (even remotely, the Akonadi remote 
debugging server has a D-Bus TCP bridge built in that is also usable stand-
alone). Doesn't really help with things like QAbstractItemModel though.

> > You can probably get a large amount of the features by having some kind of
> > network transparent QAbstractItemModel adapter. But some feature need
> > direct memory access, like rendering of a second QGraphicsScene view,
> > unless you want to send pixmaps over IPC.
> Sounds manageable.
> >> Is there a single point where all the information of
> >> the target process goes through or is it all over the place?
> >> I assume at least each plugin pulls information by itself.
> > 
> > Most of it goes through probe.cpp and the object models provided by it,
> > however all the plug-ins access raw QObject pointers they retrieve from
> > those models (and thus are bound to the same process).
> OK, but when the plugins also support ipc, it should be possible to remote
> debug/monitor for instance a state machine.

right, I think it's definitely doable, it's just quite a bit of work :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list