Daniel
Daniel

Reputation: 692

How can I get command history for console-based debugging in PyCharm?

When I use PyCharm I find myself frequently trying out pieces of code interactively. So far, my workflow has been to use pdbfor this and set a breakpoint as pdb.set_trace, which then drops me into the console.

However, for PyCharm the resulting console has no command history - the up arrow instead moves the cursor upwards into the previous output, which is a pain to use.

I realize there's also the built-in debugger that has a console with history, but getting there involves more clicks (run the debugger, switch to Console tab and clicking on "Show Python Prompt").

There is a built-in console that does have a command history (Tools > Python Console), however, unfortunately that's not the console that's being run for pdbbreak points. Is it possible to get PyCharm to use a different console for pdb?

Upvotes: 2

Views: 1280

Answers (1)

yole
yole

Reputation: 97338

No, it's not possible. PyCharm has no control over what happens when you invoke pdb.set_trace().

Upvotes: 1

Related Questions