Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - Debug running application

Tags:

python

pdb

gedit

I'm trying to fix bugs from gedit plugins. Gedit uses C but some of its plugins are in Python. My computer is old and I cannot run an IDE. I've read about PDB (Python Debugger), but i cannot call the plugin directly with PDB. Is it possible set breakpoints in a gedit plugin, run gedit and then use PDB to debug?

like image 619
thom Avatar asked Sep 08 '26 05:09

thom


1 Answers

You could try editing the gedit plugins that you want to debug and putting

import pdb; pdb.set_trace()

in there and that should break into the debugger. You might need to launch gedit from a command prompt instead of the GUI so that it has a terminal for pdb to run in.

like image 198
Marc Abramowitz Avatar answered Sep 12 '26 08:09

Marc Abramowitz