Integrating the GammaRay Probe into an Application
In some scenarios it might be desirable to not use GammaRay's dynamic injection mechanism, but to build the GammaRay probe into the target application at compile time already. Static linking is one such use-case, as dynamic injection doesn't work then.
There are two ways available to integrate the probe into a target application:
- Dynamic linking to the GammaRay probe DLL. This is useful for example for use with application bundles on platforms that allow dynamic linking (e.g. on Android). GammaRay provides the probe DLL as link tarket for qmake and CMake based build systems. You need to ensure to deploy all GammaRay DLLs and probe plugins too in this scenario.
- Static linking to the GammaRay probe and all relevant plugins. This is a more complex setup but your only option when using a statically linked Qt. Compile GammaRay with the
-DGAMMARAY_STATIC_PROBE=ONCMake option, add the
GAMMARAY_STATIC_INJECTmacro to your application code and link the application against the GammaRay probe and all relevant plugins. See
tests/manual/staticinjectiontestin the GammaRay source code for an example.
Creating Custom GammaRay Plug-ins
GammaRay can be extended with custom plugins. The main extension points for plugins are:
- Add entirely new Tools, for example for additional frameworks.
- Add additional tabs to the Object Inspection view. This is most useful for inspecting aspects of objects shown in multiple tools.
- Extend the Properties view by additional means to retrieve object properties.