3

I am writing a Python code using curses library under Linux. Are there any debugger does not share the same terminal, so I can debug alone with the code running?

EDIT:

I tried WinPDB, but it works only with python 2.7, and I am using 3.3

2
  • I don't know of such a debugger, but you could use tail -f on a logfile and curses.wrapper to make your life a bit easier. Commented Oct 4, 2013 at 15:52
  • @EmmettJ.Butler but I need to debug the curse code... Commented Oct 4, 2013 at 15:54

1 Answer 1

0

IPython supports embedding a “kernel” which can then connect to an external front-end, such as a Qt one (qtconsole).

For working with another tty, I’d suggest connecting the debugger with another tty either via a pair of pipes or a pty (pseudo terminal), although you’d probably have to write the “other half” to display in the terminal, whereas the qtconsole is already ready to use as-is.

You install the Debian package ipython-qtconsole (or the Py3k version ipython3-qtconsole), then just run “ipython qtconsole” on the command line to get a GUI window containing the debugger.

Embedding is also possible: you can modify your program to call the ipython “kernel” at some point which is like setting a breakpoint.

Sign up to request clarification or add additional context in comments.

1 Comment

Also see stackoverflow.com/questions/14376469 for info on problems when trying to embed the qtconsole. The detail depends on what you precisely need (pdb can be used inside IPython, or you can just embed an IPython kernel at some point in the script to inspect state, etc.) – lots is possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.