rightdictionary.blogg.se

Debug script python
Debug script python








debug script python

If you have Python extensions installed, you can enter: The quality of the results will depend greatly on the amount of debug information available. With luck, this will give some idea of where the problem is occurring and if it doesn't help you fix the problem, it can help someone else track down the problem. If you are debugging a segfault, this is probably the first thing you want to do.Īt the (gdb) prompt, just run the following command: See the page EasierPythonDebugging for the list of Python helper commands for gdb. You can also manually interrupt program execution by pressing Ctrl+C in the console. If your program segfaulted, gdb will automatically pause the program, so you can switch into gdb console to inspect its state. You can tell it to continue running with c command. If the process is already running, you can attach to it provided you know the process ID.Īttaching to a running process like this will cause it to stop. This will run the program til it exits, segfaults or you manually stop execution (using Ctrl+C). To run python under gdb there are also two ways. attach to already running python process.Note: the python executable needs to have debug symbols in it which may be another exe python2.7-dbg depending on your system python-debuginfo is installable after the first two commands.įor gdb support on legacy systems, look at the end of this page.

#DEBUG SCRIPT PYTHON INSTALL#

On a modern Linux system, you can easily install these with: Extensions package includes debugging symbols and adds Python-specific commands into gdb. You need to have gdb on your system and Python debugging extensions. Hung processes (in cases where you can't get a Python traceback or debug with pdb)

debug script python

segfaults (not uncaught Python exceptions).There are types of bugs that are difficult to debug from within Python:










Debug script python