Using VSCode with Jupyter

While I can see the value of interactive programming with Jupyter notebooks, I have found coding in the browser to be immensely frustrating. Part of it is having to learn a whole new set of keyboard shortcuts, but even then the editing experience leaves a lot to be desired. Refactoring across multiple cells is particularly painful.

This evening I tried using the new “data science” features in the VSCode Python extension and so far I’m really liking it. It spins up a Jupyter server behind the scenes (or you can connect to a remote one) so it works just like a notebook but you get to stay in VSCode. Cell output appears in a parallel window which I think I actually prefer as it avoids the problem where running a cell causes the source to scroll out of view.

I think PyCharm has a similar feature but only in the paid version.


Wondering out loud:

  1. Can you confirm that the extension offers importing and exporting to .ipynb files?
  2. Sometimes inline output, like Jupyter Notebooks is desirable. Is inline an option?
  3. Doesn’t Jupyter Lab offer separate windows? But VSCode offers debugging while Lab doesn’t?
  4. I don’t think Jupyter Hub is available for Windows? So VSCode server would be a unique feature?

Answering my questions:

  1. Looks like the latest VSCode can import and export .ipynb files.
  2. VSCode doesn’t seem to have an inline output feature.
  3. JupyterLab offers both inlined output and a separate output window, or both simultaneously.
  4. JupyterHub is still not officially supported on Windows so the VSCode server on Windows appears to be a unique feature although I don’t know if Windows server can spawn new instances of notebooks.