Installing Python Symbols

In order to debug Python and C++ code together and to show the contents of Python variables VisualGDB requires the debug symbols for the Python executable.

Normally the symbols should be installed automatically by VisualGDB Project Wizard, however if this does not happen, this page explains how to install them manually. The exact instructions depend on the operating system you are using.

Debian-based systems (including Raspberry Pi)

In order to install the symbols on Debian-based systems, use the following command line for Python 2.x:

sudo apt-get install python-dbg

If you are using Python 3.x instead, use the command line below:

sudo apt-get install python3-dbg

Red Hat-based systems (including CentOS)

In order to install the Python symbols on Red Hat-based systems, use the following command line:

sudo yum install python-debuginfo

Cygwin

In order to install Python symbols on Cygwin, use the Cygwin setup program to install the python-debuginfo package (for Python 2.x) or python3-debuginfo package (for Python 3.x):

Checking the symbol consistency

You can check whether the symbols are installed by running gdb <python executable> and then executing the "info line main" command. If the correct symbols are installed, GDB will report a line number:

If the symbols are missing, GDB will report that the line number information is missing: