NextGen TotalView for HPC User Guide : PART II Debugging Tools and Tasks : Chapter 7 Debugging Python : Starting a Python Debugging Session
Starting a Python Debugging Session
To set up a Python and C/C++ debugging session with TotalView:
1. Set up a new Program Session.
Start a new Program Session, enter the path to the debug Python interpreter into the File Name field and the name of the Python file to run as an argument to the interpreter in the Arguments field, and click Load Session.
Figure 72 – Set up a Python Debugging Session
For faster startup, provide the information as command line arguments to TotalView, for example:
totalview -newUI --args /usr/bin/python2.7-dbg test.py
2. Set breakpoints in C/C++ code and begin debugging.
To set a breakpoint in the C/C++ Python extension code, use the At Location dialog, available via the Action Points > At Location menu.
Enter a Python extension function name or file #line location, and check “Create a pending breakpoint” to create a breakpoint in code that TotalView is not yet aware of. Click Create Breakpoint.
Figure 73 – Create a Breakpoint on a Python Extension Function