Debugging
This page assumes you are able to fully compile the GeoDMS executables by following the steps at compiling-the-geodms. Debugging is an essential part of software development. There are two ways to debug the GeoDMS: debugging the command line program (GeoDMSRun.exe) and debugging the GUI (GeoDMSGui.exe).
Currently, GeoDMS development is done with Microsoft Visual Studio Community 2026 (MSVC2026).
Debugging GeoDMSRun.exe
- In MSVC2026, right-click on GeoDMSRun in the Solution Explorer and select Set as Startup Project.
- Right-click on GeoDMSRun again and select Properties.
- Navigate to Configuration Properties > Debugging.
- In the Command Arguments field, enter the full path to the .dms configuration file you want to debug, followed by the item path you want to run.
Example command arguments:
"C:\Projects\MyConfig\config.dms" /MyContainer/MyItem
- Press F5 or click Debug > Start Debugging to start the debugger.
Debugging GeoDMSGui.exe
Debugging the GUI is more dynamic compared to debugging GeoDMSRun.exe, as it allows you to interactively navigate the configuration.
- Copy GeoDmsGui.exe from the official GeoDMS installation into your output folder (e.g.,
bin/x64/Releaseorbin/x64/Debug). - In MSVC2026, right-click on the project you want to debug and select Properties.
- Navigate to Configuration Properties > Debugging.
- In the Command field, enter:
$(OutDir)/GeoDmsGui.exe - In the Command Arguments field, enter
/noconfigto start an empty GUI without loading a configuration file. Alternatively, provide a path to a .dms file to load it directly.
Example command arguments:
/noconfig
or
"C:\Projects\MyConfig\config.dms"
- Press F5 to start debugging. You can then open a configuration file from the GUI and navigate to the items you want to debug.
Tips
- Use breakpoints to pause execution at specific lines of code.
- Use the Watch and Locals windows to inspect variable values.
- Use Debug > Windows > Call Stack to view the current execution stack.
-
For performance issues, consider using the [[Profiler Agent profiler_agent]] or Visual Studio’s built-in profiling tools.