Using Pdb with Swift does not work because Swift redirects stdin (even in foreground mode). Here we describe how to get it work.
-
apply attached patch on Swift source
-
wherever you'd call
pdb.set_strace()
do it like this:
from swift.common.utils import stdio_restore import pdb stdio_restore.raw() pdb.set_trace()
or, for your convenience, as one liner ;) :
```python
from swift.common.utils import stdio_restore; import pdb; stdio_restore.raw(); pdb.set_trace()
-
start Swift in foreground: