thorwhalen
thorwhalen

Reputation: 323

Is there anyway to link iPython notebooks and PyCharm, especially regarding debugging?

iPython notebooks and PyCharm have complementary features, so I'm switching a lot from one to the other. But I would like to make the relationship tighter.

For example, when I'm in a notebook and some code blows up, I would like to set a break point in PyCharm, run my code snippet again, and explore the variables in the breakpoint's scope.

At this point, when I'm in this situation I have to either:

  1. Use the debug command in the notebook, but the navigation within this debugger is a bit clunky (no context autofill, no back-history, no function help display... basically, it seems I'm not in a notebook anymore!)
  2. Go to PyCharm, write a script to recreate the same environment (i.e. imports, variables with their values, etc.) as I was in in the notebook, and launch debug on that script.

This is the main use case I'd like to see solved. Of course, things like triggering PyCharm's "find usages" and "jump to definition" from iPython notebook itself would be a charm (pun not initially intended), but I'll curb my desires for the perfect IDE. For now.

Upvotes: 23

Views: 1725

Answers (1)

Will
Will

Reputation: 11500

PyCharm 4.0 just came out with iPython integration and allows you to edit *.ipynb files. The official notes are here. Here's how it looks on my screen:

enter image description here

Upvotes: 9

Related Questions