Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Julia in VS code?

I'm coming from a pure Windows Visual Studio programming background with little Linux experience. It seems possible to use VS Code to program in Julia, but I can't figure out how to get things set up correctly.

Does anybody have good example launch.json, tasks.json, or other files that can serve as an example to build from?

This would be a great thing to see in a detailed tutorial.

like image 537
mattica Avatar asked Dec 01 '16 23:12

mattica


People also ask

How do you run the Julia script in VS Code?

Running a Julia file The VS Code command Run: Start Without Debugging (Ctrl+F5) by default starts a new Julia instance and runs the currently active Julia file. The command automatically creates a new VS Code terminal for this Julia process.

How do I start Julia in terminal?

For this, we will use the integrated terminal in VS Code. Recall that you can start this directly from the command palette with <Ctrl+Shift+P> then typing part of the > Julia: Start REPL command.


Video Answer


1 Answers

Here is how things work if you are using the Julia extension for VisualStudio Code.

The extension adds a bunch of new commands. They all start with "julia", so filtering by that string should show you everything you can do with the extension.

In terms of running Julia code, the extension offers only two options right now. First, you can execute a command to start a REPL. This will just show a default Julia prompt, and you can interact with it like you would with any other Julia REPL. The second is that there is also a command, triggered by Ctrl + Enter, to send either the current editor selection or the current editor line to this REPL.

There is currently no further integration offered by the Julia extension. We do plan to add debugger support in the future, at which point I would expect F5 to start the current file in the debugger, or something like that. But that functionality is probably a couple of months away.

like image 91
David Anthoff Avatar answered Sep 22 '22 08:09

David Anthoff