Debugger support new in Git master
Pretty-printers for Corrade types and other debugging aids.
GDB pretty printers
The src/${CMAKE_INSTALL_PREFIX}/share/gdb/python
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:
python # If not installing into /usr, you'll need to insert the install location (or # the src/debuggers/gdb/ directory inside Corrade sources) to Python's path: #import sys #sys.path.insert(0, '/corrade/install/prefix/share/gdb/python') from corrade import register_corrade_printers register_corrade_printers(gdb.current_objfile()) end
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/${CMAKE_INSTALL_PREFIX}/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.