How to run code cell in a REPL that I already opened in VS code?

When I run alt-enter on a code cell/ code block after opening up VS code, it automatically opens up a REPL, even if I already opened one up within VS code. Is there a way to run code cells within a REPL I already opened without copy pasting (by doing alt-enter instead)? Thank you!

If you open the VSCode REPL with the dedicated command, your code lines should be run there. Maybe the issue is that you opened your REPL by typing julia into a VSCode terminal? In which case VSCode will launch a new REPL which it recognizes as a Julia REPL (and not a simple terminal)

1 Like

thanks!!

You can also use the “connect to external REPL” command, even if it’s a repl launched inside VS code

1 Like

Would you be willing to link resources that explain this option in more detail?

It’s never obvious to me where to find the docs, but the short version is: open the command pallette (ctrl+shift+P), type “REPL” and you should see something like “connect to external REPL,” which will give you a code that you can paste into an open REPL.

2 Likes

thanks for sharing!

1 Like