GQI extension debugging
From DataMiner 10.5.11/10.5.0 [CU8] onwards, when using the GQI DxM, you can debug GQI extension libraries by attaching a debugger to the extension worker process.
Note
Unlike with regular Automation scripts, it is not yet possible to attach a debugger directly from a DIS Visual Studio solution. Instead, you publish the script to a DMS first and then use the resulting C# script code and debug symbols generated by the Automation module to attach the debugger.
Tip
In earlier versions of DataMiner, you can use the following debugging approaches:
- Adding detailed logging to reveal the state of the extension at specific points over a period of time.
- Creating a memory dump of the extension worker process to inspect memory usage and verify the state of your extension at runtime.
Creating a debug build
You can enable debug mode for an extension library either via the DIS Visual Studio solution or via the Cube Automation module.
Via the DIS Visual Studio solution
Open the associated script XML file.
In
DMSScript
>Script
>Exe
, add<Param type="debug">true</Param>
.Publish the script to the DMS.
<?xml version="1.0" encoding="utf-8" ?>
<DMSScript options="272" xmlns="http://www.skyline.be/automation">
...
<Script>
<Exe id="1" type="csharp">
...
<Param type="debug">true</Param>
</Exe>
</Script>
</DMSScript>
Via the Cube Automation module
Open the script that contains the extension library code.
Expand the Advanced section below the C# code block that contains the extension library code.
Select Compile in DEBUG mode.
Save the script.
Artifacts
When the debug build of the extension library is successfully compiled, the following artifacts will be created in C:\Skyline DataMiner\Scripts\Libraries
:
- Debug build of the extension library:
[ScriptName].[LibraryName].[Timestamp].D.dll
- Generated C# source code:
[ScriptName].[LibraryName].[Timestamp].D.cs
- Debug symbols:
[ScriptName].[LibraryName].[Timestamp].D.pdb
Attaching the debugger
Open the C# source code file (e.g.
C:\Skyline DataMiner\Scripts\Libraries\MyScript.MyLib.2025_09_13__12_34_56.D.cs
) in your preferred IDE.On the DMA you want to debug, execute a GQI query that uses an extension from your library. This will start up the extension worker process on that DMA.
Attach the debugger to the extension worker process that is now running.
Every individual extension library is loaded into its own extension worker process. The name of the extension worker process is DataMiner.GQI.ExtensionsWorker.Automation.exe.
To know which process belongs to your extension library, you can look at the command line argument
-id
. For example, the extension worker process for library MyScript.MyLib will have command line arguments containing-id "MyScript.MyLib"
.
You can now place breakpoints in the source code file, step through code, inspect variables, etc. whenever GQI executes your code on the DMA.