Can we connect to mybinder in a local vscode?

Hello everyone. :grinning:

I would like to ask if we can connect to the mybinder service in the local VS-Code and if so, how should I do it?

2 Likes

When you launch a MyBinder environment you can copy a link, with token, to the server from the Jupyter logo in the top left hand corner of a running Binder page.

It will be of the form:

https://hub.gke.mybinder.org/user/USER_REPO_HASH/tree?token=SOME_TOKEN

Delete the tree element to give something like:

https://hub.gke.mybinder.org/user/USER_REPO_HASH/?token=SOME_TOKEN

and use that as your Jupyter kernel connection string in VS Code.

6 Likes

Thank you for your reply, as per your answer I have successfully connected to binder in vscode!

Also I was wondering if there is a way we can connect to binder remotely in vscode and then write the program by installing a remote extension (e.g. python or julia) instead of in Jupyter?

I think a VS code extension would be interesting. The extension might also pass a heartbeat to try to keep the Binder environment alive. eg there may be some clues as to how to do that here

2 Likes