[Gluster-devel] [gluster-swift] Swift and Pdb and some other Python stuff

Csaba Henk csaba at redhat.com
Wed Sep 18 12:43:55 UTC 2013


Hi,

so the story is that upon trying to wrap our minds around
Swift (with Gluster backend and general), we were desperate
to do some investigation with Pdb.

But Pdb does not work with Swift.

At first, I made some reseach on alternative/supplementing
introspection techniques. At second, found out the problem
with Pdb and made a hack to make it work :)

Hereby I share the outcome, you might find it useful.

The outcome of the first session are the following two docs,
these are general, can be applied to any Python code:

- Debugging detached Python: https://gist.github.com/csabahenk/6497709
  For general purposes, most of it is not so interesting if pdb is available;
  however, the "Stack printing" section is still useful I think:

   https://gist.github.com/csabahenk/6497709#stack

- Some fun with Python and JSON: https://gist.github.com/csabahenk/6527883
  It's a bit subjective writeup, describes some of my preferred tools to
  extract information from Python.

Then this is how to get pdb working with Swift -- that's of course specific
to Swift:

- Swift and Pdb: https://gist.github.com/csabahenk/6608268

Enjoy,
Csaba 





More information about the Gluster-devel mailing list