June 12, 2018
by Tibor Lorántfy

Tools for debugging (updated)

The API depends on other modules (which are also part of the Development Kit) which support platform independent development. Many API structures and functions use the GS::UniString class from GSRoot module for Unicode strings, or the IO::Location class from the InputOutput module which represents file system independent file locations. GRAPHISOFT publishes debug tools for these most frequently used types.

Using these debug tools you will be able to check the readable values of these complex typed variables in Microsoft Visual Studio and in Xcode also. To start visualizing these GRAPHISOFT module specific types download and install our debug tools. They are available for both platforms, see below for further instructions.

Debugging IO::Location typed variable using NatVis files

For Visual Studio debug tools follow these steps:

  1. Download the GRAPHISOFT Visual Studio debug visualizers.
  2. Unzip and copy the files with .natvis extension to your %USERPROFILE%\Documents\Visual Studio 2015\Visualizers folder.
  3. Restart Visual Studio (or issue a .natvisreload command in the Immediate Window while debugging).

For Xcode LLDB debug tools:

  1. Download the GRAPHISOFT LLDB debug formatters.
  2. Unzip and copy the python script to an optional folder inside your user home folder.
  3. Add these line to the ~/.lldbinit file (create this file if is does not exist):
    command script import ~/<path_to_formatters>/LLDB_Visualizers.py
  4. Restart Xcode (or LLDB debugger).

The Visual Studio debug visualizers pack contains visualizers for the following classes:

  • From the GSRoot module: GS::Guid, GS::String, GS::UniString, GS::UniChar, GS::PagedArray, GS::ArrayFB, GS::Array, GS::Queue, GS::HashTable, GS::HashSet, GS::Owner, GS::Optional, GS::AutoPtr, GS::CountedPtr
  • From the InputOutput module: IO::Name, IO::RelativeLocation, IO::Location, IO::File, IO::Folder

And there are Xcode LLDB debug formatters for these classes:

  • From the GSRoot module: GS::UniString, GS::Array, GS::HashTable, GS::Pair
  • From the InputOutput module: IO::Name, IO::RelativeLocation, IO::Location