[ANN] Julia for VS Code v1.6

Hey everyone,

we’ve just released version 1.6 of the Julia extension for VS Code.

The highlight of this release is probably the new profile viewer, which should be fairly familiar to Juno users:

Check out the documentation for more info.

Apart from that there are of course a bunch of QoL improvements and bugfixes; you can find the change log here.

As always, don’t hesitate to open an issue if you run into problems, or reach out here on Discourse, Slack, or Zulip.

64 Likes

The new profile viewer is amazing! :clap: :clap: :clap: :clap:

4 Likes

When trying to use @profview I get the following error:

ERROR: LoadError: KeyError: key 0x0000000000000002 not found
Stacktrace:
  [1] getindex
    @ ./dict.jl:498 [inlined]
  [2] VSCodeServer.ChromeProfileFormat.CPUProfile(data::Vector{UInt64}, period::Nothing; from_c::Bool)
    @ VSCodeServer.ChromeProfileFormat ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/ChromeProfileFormat/src/core.jl:116
  [3] CPUProfile
    @ ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/ChromeProfileFormat/src/core.jl:58 [inlined]
...
julia> versioninfo()
Julia Version 1.8.0-beta1
Commit 7b711ce699 (2022-02-23 15:09 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.2.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 50 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 50

EDIT: seems to be a 1.8 problem, it works on 1.7

The fact that ChromeProfileFormat in indicated in the stacktrace means you’re not on the latest version of the extension.

I’m pretty sure the extension got updated after you generated that error. If you look at the stack trace in your original error, you can see that it was generated from the 1.5.11 version of the extension.

1 Like

Oh I see - thanks for clarifying that.

Amazing work! Really appreciate it!! :smile:

Can the new profiler be used to export full profile information a la GitHub - tkluck/StatProfilerHTML.jl: Show Julia profiling data in an explorable HTML page ? I think ease of sharing profiles not as screenshots will be something majorly useful for helping people debug on here. As SVGs and such so they can just drop them into Discourse.

2 Likes

In principle, yes (that’s an old version of the UI). In practice there’s no easy way to generate a HTML file from within VS Code currently, so
https://github.com/julia-vscode/julia-vscode/issues/2789

3 Likes