Top-rated recipes tagged "pdb"http://code.activestate.com/recipes/tags/pdb/top/2012-03-14T15:12:39-07:00ActiveState Code Recipessane tab completion in pdb (Python)
2009-07-06T04:35:33-07:00Stephen Emsliehttp://code.activestate.com/recipes/users/4004606/http://code.activestate.com/recipes/498182-sane-tab-completion-in-pdb/
<p style="color: grey">
Python
recipe 498182
by <a href="/recipes/users/4004606/">Stephen Emslie</a>
(<a href="/recipes/tags/complete/">complete</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/pdb/">pdb</a>, <a href="/recipes/tags/tab/">tab</a>).
Revision 6.
</p>
<p>I make frequent use of python's built-in debugger, but one obvious feature seems to be missing - the bash-like tab completion that you can add to the interpreter. Fortunately pdb's interactive prompt is an instance of Cmd, so we can write our own completion function.</p>
<p>Note: this uses rlcompleter, which isn't available on windows</p>
<p>Edit (6 Jul 2009): import rlcompleter early and force output to stdout to ensure monkeypatch sticks
Edit: updated to handle changes in local scope
Edit: Fixed start via 'python -m pdb ...'. Check the comments for details.</p>
RPDB (RobotPythonDebugger) -- a smarter way to debug robotframework tests (Python)
2012-03-14T15:12:39-07:00Daniel Cohnhttp://code.activestate.com/recipes/users/4172918/http://code.activestate.com/recipes/578073-rpdb-robotpythondebugger-a-smarter-way-to-debug-ro/
<p style="color: grey">
Python
recipe 578073
by <a href="/recipes/users/4172918/">Daniel Cohn</a>
(<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/pdb/">pdb</a>, <a href="/recipes/tags/redirect/">redirect</a>, <a href="/recipes/tags/robot/">robot</a>, <a href="/recipes/tags/rpdb/">rpdb</a>, <a href="/recipes/tags/stdin/">stdin</a>, <a href="/recipes/tags/stdout/">stdout</a>).
</p>
<p>Robotframework (<a href="http://code.google.com/p/robotframework/" rel="nofollow">http://code.google.com/p/robotframework/</a>) is a tool used to run functional tests against a variety of targets. Tests are organized in the form of keyword tsv or html files, which map input parameters to keyword-argument methods in the test suite. Robot includes a fairly advanced logging mechanism, which is cool -- until you try to debug anything. Debugging is made difficult because robot steals stdin and stdout when it is run, which means bye-bye debugging in the terminal. rpdb solves this in a KISS simple way.</p>