Equivalent to pdb.set_trace()?

Is there an IntelliJ/PyCharm equivalent to pdb.set_trace() that drops me into the GUI debugger?

Sometimes I just want to type in a little bit of logic to drop me into the debugger conditionally.

I'm okay if it's an undocumented/unsupported hacky thing I could do that might break in the next release.
2 comments
Comment actions Permalink
You can use the Run -> Debug... to create and run a debug configuration for a module of your interest. You can put a breakpoint on a line by clicking on its left margin. The context menu of a breakpoint has a "Condition" field, where you can type an stop expression. When it is true the debugger will stop at the breakpoint.
0
Comment actions Permalink
If you can't start your app directly from PyCharm, you can use remote debug session.
http://www.jetbrains.com/pycharm/webhelp/run-debug-configuration-python-remote-debug.html
0

Please sign in to leave a comment.