[gedit-list] Debugging Plugins



Hi all,

i'm interested to walk through my python plugin code "step by step", so i can set breakpoints and very important watch values on exution.
Is there any way, i can do this?
Cause i need imported"gedit", it must be available in gedit.
I found this:

on:        http://live.gnome.org/GeditPluginHowto

Debugging using DDD

DDD is a front-end GUI for the GNU debugger, gdb. On Fedora systems, you can install it by entering yum install ddd.

Start up Gedit from inside DDD using File->Open Program, typing /usr/bin/gedit into the Program field, and then pressing Run on the floating window. Make sure that Gedit isn't already running, as in that case new instance will just raise the old instance to the front then exit, which is not what we want.

With Gedit running, you can open the source code for your plugin with File->Open source, and set breakpoints in your source code with right-clicks of the mouse. I don't know of any way to set a breakpoint before Gedit has loaded the plugin (this isn't really even a gdb issue, it's an issue with dynamically loaded shared libraries), so the new plugin should be healthy enough to not crash Gedit when loading. ;)

You can quit the Gedit run from inside DDD, open another Gedit (or not), change the source, make and install the plugin, and press Run in DDD again to do more debugging. The Source menu Reload Source command should be used so that ddd will notice the changes. Breakpoints may need to be adjusted.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But how can i load a plugins source in DDD?
I don't think that works, cause i can only load .c .h - files and so on, but of course no .py - file
If someone can give me a little tutorial on how to do this, that would be nice.

Thanx for answering.

dennis605



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]