Version 1.7.2 of Julia. Latest version of VS Code.
I got the command from the plugin Julia Connect to External REPL to work once. A sort of prompt came up with a button. I clicked it. I had an external repl connected. I could execute cells from a notebook script. Awesomeness.
Now, I can’t get it to work again. I uninstalled and reinstalled the plugin. Didn’t fix it.
There is no documentation of how to do this in the Visual Studio Code for Julia documentation here: Home · Julia in VS Code. There is a section on running code, but no mention of external repl. In fact, searching the documentation for “external” brings up no results. Well, it does but the returned documents don’t actually contain the word “external”.
The internal REPL is OK: a tiny bit slower. I actually prefer the separate terminal window because it doesn’t have to share all the “chrome” of the VS Code UI.
I can get by but I’d love to get this working again.
What does “no longer works” mean? What exactly happens after running the
Julia: Connect to External REPL command?
Nothing happens. It’s a noop.
Hm, I can’t repro that. What version of the extension do you have installed?
Actually, I spoke too soon.
It displays an alert, “Start a Julia session and execute the code in your clipboard into it.”
Well, I am a dope—I was stumped because the button or checkbox for “always paste… “ or something to that effect didn’t work.
So, I followed the instructions: copied some Julia, started an external terminal, ran Julia, pasted—and the connection was established. I need to recopy the Julia I intend to execute because the initial paste creates the connection and doesn’t execute the pasted statements. Then, I can step through a notebook script and it all works.
Apologies: I was stumped because it appeared different than the first time I got it to work and there is no mention of this feature in the “running code” explanations in the doc. Shall I try a pull request to add a sentence or two?
Glad you got it figured out. The prompt changed because you clicked “Always copy code” when asked whether you want to copy the connection code into your clipboard (that option was implemented in Add "Always copy" option to "Connect to external REPL" by pfitzseb · Pull Request #2759 · julia-vscode/julia-vscode · GitHub).
Yes please! Many features are chronically underdocumented, so every contribution is very appreciated.