VS Code extension v0.11.0 beta release

Hi all

We’ve released a beta for the next version of the Julia VS Code Extension, v0.11.0-beta.1. We’d much appreciate it if we could get some testers to try it out and give feedback on bugs before we release it to the marketplace.

This release is all about updating to julia 1.0. It drops support for older versions of julia. This version starts to offer support for julia environments, but we won’t finish that feature before we ship this version. That is not ideal, but right now we think it is more important to ship a new version than to be perfect :slight_smile:

If you can, please opt into the crash reporting of the extension! It makes finding and fixing bugs a lot easier for us.

To try the beta download the VSIX file from https://github.com/JuliaEditorSupport/julia-vscode/releases/download/v0.11.0-beta.1/language-julia-0.11.0-beta.1.vsix and install using the Extensions: Install from VSIX… command.

Thanks,
David and Zac

24 Likes

Thank you for your work

2 Likes

So far I haven’t had any luck installing the extension. The process appears to complete, but Julia language never appears on the list of available languages, and is not recognized when Julia source files are opened.

Edit: The extension needs to be manually ENABLED. It is installed, but it is disabled by default.

Execute file produces a huge mess: the entire text of the file appears to be copied and pasted into the REPL, but something goes wrong and there appears to be an infinite loop which has to be stopped by killing the console.

Edit: I think the loop resulted because the Julia file was run when the REPL was not in the same directory as the file. Fixing that eventually produced results, but they are not pretty:

1 Like

Execute code block results in the message
image

The plugin should use bracket pasting when sending the code to the repl (bracketed paste mode).

1 Like

Hover help does not work for my own functions:

Or, instead of copying and pasting the contents of the file, it should run include() (which is what Sublime Text 3 does).

I have the same problem as @PetrKryslUCSD with the wrong alignment of the row starts in multiple-row functions executed by alt-enter


I’m on win7-64, lastest vscode, extension beta-1.

As a work-around this might work Julia snippets: Disabling auto-indentation of code in Julia REPL.

Hopefully https://github.com/JuliaEditorSupport/julia-vscode/pull/588 should fix the pasting problems.

2 Likes

This may be a silly question. Since Atom and VSCode are both based on Electron, is it possible to transfer Juno to VSCode? I mean, since VSCode is getting increasingly welcomed, it makes sense to have a dual distribution of Juno on both Atom and VSCode.

Thanks for all the feedback!

One small thing: we’ll follow up on feedback wherever it shows up, but you can make our life a little easier if you report issue back on github here GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code. That way we don’t have to just copy information from here over to there manually :slight_smile:

1 Like

Sure thing, will do.

Thanks very much for working on VS code! It is a great contribution to the Julia ecosystem, and many people benefit.

5 Likes

We have a new beta release: You can download v0.11.0-beta.2 from here.

Thanks for all the feedback we received so far! Please update to the new beta.2, and keep reporting any bugs you can find!

3 Likes

I think at this point we are really well served to have good extensions for both. Folks have different preferences for their editor, and I think a robust ecosystem will just support them all.

The two projects also benefit in an informal way from each other: I often take a look how things are done in Juno, and sometimes just copy things, and I think similar stuff has happened in the other direction as well. All the devs also talk with each other, which is also really helpful.

I think we might see more actual code sharing going down the road, but I’m not sure. @pfitzseb has been quite actively exploring LanguageServer.jl, and I could see that being adopted more broadly, which would amount to a huge amount of actual code sharing. I could also see that in other areas, but I think it makes most sense to let that happen organically.

5 Likes

I tried the VS Code v0.11.0-beta.1 with Julia 1.0.2 on Windows 10 64-bit. Here are several observations:

(1) If I use Julia REPL (started by F1, then “Julia: Start REPL” or by Ctrl-Enter to execute selected lines of code), my PyPlot plotting will take long time and will not generate any window with plot. However, if I go with the standard terminal and start Julia manually there, the PyPlot plotting works fine. This is a big problem for me as my script does a lot of plots.

(2) F5 to execute script: I would strongly agree with PetrKryslUCSD above - PLEASE use “include” instead of duplicating all the lines of code from editor to REPL - that takes a long time for my script which is merely a few hundred lines in length, and I cannot imagine doing that repeatedly during development.

(3) Again this one was mentioned by PetrKryslUCSD: some hover help does not work for my own functions defined in the script or in a separate module, even after I did “using xxx” to load that module into REPL first. I’d add that help does not work for PyPlot functions either. For some functions e.g. “plot”, the error message is “[Julia language server] use of possibly undeclared variable: plot [Missing variable]”; but for other functions like “legend”, some doc string is shown but is not useful: “PyPlot.LazyHelp[LazyHelp(PyObject <module ‘matplotlib.pyplot’ from ‘C:\Anaconda2\lib\site-packages\matplotlib\pyplot.pyc’>, (“grid”,))]”.

(4) Last but not the least, I know full-featured debugger for Julia 1.0 is still under development, and visual debugger would have to wait, but is there any estimate when that would be available? I know some people debug well with printing and/or REPL debugger, but I was spoiled since day one by visual debuggers provided in Turbo C, GW-Basic, Borland Pascal, Visual Studio and Matlab alike, so I really missed it in Julia. :blush:

Thanks a lot for the great work!!! I really enjoy using VS Code.

OK I just noticed v0.11.0-beta.2 is out. Here are my observations trying beta.2 on Windows 10 64-bit with Julia 1.0.2:

(1) Same as in v0.11.0-beta.1: No PyPlot plot window in Julia REPL. However, if I start Julia in the standard terminal manually, plot window will show up.

(2) I can see F5 is now using “include”. However, Julia REPL just hangs indefinitely after the “include” command. My guess is, I’m on Windows so “\” appeared in paths, and Julia took those “\” as part of escape sequences. I think using a raw string for the script full path and name should solve this problem.

(3) Hover help takes quite some time to initialize and there is no indication it is still loading. Once loaded, it is still not showing doc string from my own functions or functions from my own modules. It does not show PyPlot’s “plot” as undefined symbol anymore, but it only shows something like "PyPlot.LazyHelp[LazyHelp(PyObject(Ptr{PyObject_struct} @0x00000000224e23a8), (“plot”,))] for PyPlot functions.

Thanks for this, it installed and loaded fine, but when I tried editing a project, it defaulted to the 1.0 environment, and when I pointed it manually to the directory (which has a Project.toml and Manifest.toml) it claimed the directory was not an environment. I think it would be better to use the current workspace directory as default environment, if it contains a Project.toml.

I have the same thing happening as Point (2) where the include statement hangs. Went back to Beta 1 where this does not happen.