I love the new functionality in VS code to connect to a remote jupter notebook server. It allows me to run jupyter in a docker container and code away...
However when plotting pandas tables, etc. the text output is not always optimal and for quick iteration it would be great to have eg. bokeh interactive plots available.
So I was thinking the following - would it be possible to start a jupyter notebook and after that connect VS Code to the corresponding kernel. Basically the way you can also connect an existing kernel for a running notebook.
the way I can do that now:
%connect_info
jupyter console --existing my_kernel.json
now I have my notebook in my browser and my console connecting to the same kernel. So any variable available in my browser is also available in my console (and vice versa).
Would something like executing step 5 be possible in VSCode to... I would love to send code from my editor window to my interactive python console and have access to that same kernel from my notebook...
Currently this isn't supported. We supported connecting to a remote server, but on that remote server we start up a new untitled document that we use. We don't currently have a method to hook up to an already running kernel.
I created this issue to track it here if you want to track / upvote: https://github.com/Microsoft/vscode-python/issues/4644
Maybe you can do it the other way:
Start a kernel with VS code by connecting to a remote Jupyter server, as documented here.
Start another Jupyter notebook and connect it to the existing kernel (started by VS code) using extipy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With