ALox  V. 2402 R. 0
Home ALox for C++ ALox for C# ALox for Java Download
Tools for ALox

In this section, tools that support the development process are described. Currently, ALox offers helpers for the convenient display of ALib and ALox classes in debuggers of different IDEs.

Note
IDE plug-ins for displaying log messages are under development.

1. Display of ALib/ALox Types in Debuggers

1.1 ALox for C++: Pretty Printers for GNU Debugger (gdb)

GNU debugger supports python scripts that allow the display of complex data types with so called pretty printers. ALox provides such script for its common classes and for classes of the underlying library ALib.

The script is found in the ALox source folder under

    tools/ideplugins/gdb/alibpp.py

We think the biggest problem of the concept is that the contract between the debugger and the printers is not duly specified. This means, it is not clear, what the printers should deliver and which format to use. Now, different IDEs seem to interpret the output of such printers differently and the development of the script was a pain...and probably is not finished. Nevertheless, they are very helpful, of-course.

Be sure to read the remarks on the top of the script!

1.2 ALox for C++: Debug Helper Python Script for QT Creator

IDE QT Creator supports what is called Debug Helpers. Those are 3rd party scripts written in Python language which enable to modify the display of structured C++ types in QT Creators' the debug panels.

ALox provides such script for its common classes and for classes of the underlying library ALib.

The script is found in the ALox source folder under

tools/ideplugins/QTCreator/DebugHelpers

Please refer to what is said at the top of the script and to the documentation of QT Creator to learn how to make the script available for QT Creator.

1.3 ALox for Java: Eclipse Debug View Detail Formatters

The good news is, that wherever reasonable, classes of ALib and ALox are equipped with otherwise unnecessary implementations of method toString() and the Eclipse IDE is able to display its result in the debugger.

To enable this, open the preferences dialog in Eclipse:

Window -> Preferences -> Java -> Debug -> Detail Formatters

Here, select radio button "As the label for all Variables".

For classes AString and Substring however, these methods are needed to work properly returning the string contents, instead of a human readable format with extra information. Therefore, for your convenience, in the same dialog as noted above, two debug detail helpers should be added:

  • for type "com.aworx.lib.strings.AString" add snippet
"[" + length() + '/' + capacity() + "] \"" + toString() + "\""
  • for type "com.aworx.lib.strings.Substring" add snippet
"[" + length() + "] \"" + toString() + "\""

1.4 ALox for C#: Monodevelop Debug Helpers

Wherever reasonable, classes of ALib and ALox are equipped with otherwise unnecessary implementations of method ToString() and the Monodevelop IDE is able to display its result in the debugger.

To enable this, open the preferences dialog in Monodevelop:

Edit -> Preferences -> Projects -> Debugger

Here, make a tick to checkbox

[X] "Call string-conversion function on objects in variables windows"

Unfortunately, unlike for example Eclipse IDE for Java, currently Monodevelop does not support specific debug helpers otherwise. Therefore, the ToString method of classes AString and Substring, which need to work properly returning the string contents, instead of a human readable format with extra information, have to be left as they are. But still, seeing the string contents directly is often enough.

2. Valgrind Error Suppression

The C++ Version of ALox provides a ".supp" file for the analyzer tool Valgrind. The file is found in the ALox source folder under

tools/Valgrind/alib_alox.supp

and is provided to Valgrind using option

--suppressions= .../tools/Valgrind/alib_alox.supp

For more information refer to the Valgrind Documentation.

3. Doxygen Dot-File Fixer

The C++ Version of ALox provides a small tool for patching the diagrams of the Doxygen documentation of ALib/ALox. The cmake project is found in the ALox source folder under:

tools/DoxygenGraphTemplateInstanceRemover

It consists only of a single main.cpp file and the CMake target is configured to write the release version into the

docs/

folder. There, when available, the tool is used by doxygen as a replacement to the Graphviz dot tool. The tool patches the dot file that is to be processed and then invokes the original software.
This tool is only needed, if the HTML documentation (which you are currently reading) is to be 'compiled' from scratch.