Interactive console during debug?

Does PyCharm support an interactive Python REPL when debugging? For example, can I hit a breakpoint, and inspect variables and objects from a Python console?

1
4 comments
Avatar
Permanently deleted user

Hi Matt, yes PyCharm does supply command line during debugging.

You can invoke it by pressing 'Show command line' button in a toolbar of console output window, which is described in online help on page http://www.jetbrains.com/pycharm/webhelp/debug-tool-window-console.html

1
Avatar
Permanently deleted user
followup question:
I'd like to be able to run the interactive console and see my local variables in the 'Variables Tab' the only way I know how to do this is by first running a dummy script in debug mode.

1. I take it the Variables frame is only available in debugger mode? if not please advise how to open it from a normal interactive console.

2. even during debugging the console command line is hidden by default. is there a way to default it to show whenever I debug? if not is there a shortcut key for it?

3. while in debug mode, when I shift-alt-e some code, to evaluate selection, the variables are not updated in the Variables tab until I click on another stack frame and back. is there a quicker way to refresh it? ( short cut key perhaps )

4. While in debug mode, paused at a breakpoint, from the interactive CONSOLE, if I call another function from a library where I've put a breakpoint halfway, is there a way to get it to pause there?

end of thee day all I want is the interactive console to show my variables in an interactive frame. and be able to evaluate functions from it with debugger capabilities when calling them. I've worked with proprietary python IDEs that do this so I'm trying to mimic this behavior.

Info:
I'm running Windows XP pycharm 2.7.1

1

Yes you can do it! Once you hit a breakpoint or pause in the debugger, you can press the debugger button "Evaluate Expression" (or hit Alt+F8 on windows by default). This will open a window that allows you to evaluate any expression in the environment of the currently paused debugger.

1
Avatar
Permanently deleted user

For anyone who simply does not see the symbol for the interactive debug console: Check if you activated "Emulate terminal in output console" in your execution configuration.

0

Please sign in to leave a comment.