Debugger support new in Git master

Pretty-printers for Corrade types and other debugging aids.

GDB pretty printers

The src/debuggers/gdb directory contains GDB pretty printers for most Containers classes. Contents of this directory are also copied into ${CMAKE_PREFIX_PATH}/share/corrade/debuggers/gdb during installation, where the prefix is usually /usr or /usr/local.

Easiest is to auto-load them on startup, by putting the following snippet into the user-specific ~/.gdbinit or ~/.config/gdb/gdbinit file:

import sys
# Adapt this path to the actual install location (or Corrade's src/ directory).
# Not pointing to the debuggers subdirectory here because it could conflict
# with the built-in GDB module.
sys.path.insert(0, '/usr/share')
from corrade.debuggers.gdb import register_corrade_printers

In case of MSYS2/MinGW, when running outside of the MSYS2 shell, you may need to put the file into %USERPROFILE%/.config/gdb/gdbinit instead of $HOME/.gdbinit.

Alternatively, it's possible to load the scripts manually using GDB commands (basically, pasting contents the above snippet) or by executing a GDB script file using the source command. See also corresponding GDB docs and CLion docs for more information.

MSVC Natvis files

The src/debuggers/natvis directory contains MSVC natvis files for most Containers APIs. Contents of this directory are also copied into ${CMAKE_PREFIX_PATH}/share/corrade/debuggers/natvis during installation.

Easiest way to use is to copy them to the user-specific Natvis directory for given version of Visual Studio, such as %USERPROFILE%/Documents/Visual Studio 2022/Visualizers.

See also corresponding Natvis docs for more information.