# VS Code Julia Language Server Indexing

**URL:** <https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576>\
**Category:** VS Code\
**Created:** [June 17, 2020, 3:43am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576 "2020-06-17T03:43:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Donut\_Meepo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donut_meepo/32/9085_2.png) [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Post date:** [June 17, 2020, 3:43am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/1 "2020-06-17T03:43:41Z")

</div>

Hi,

I had installed the Julia extension awhile ago. But every time I used it, it stalls at indexing and never ends. The indexing consumes CPU sources.

Julia extension 0.15.40 on Ubuntu 16.04

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/e/ce803c023594ea494fec94d70b004b7b92e57b9e.png)

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [June 17, 2020, 4:24am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/2 "2020-06-17T04:24:06Z")

</div>

How long have you waited for it to end? It can take some considerable amount of time if you have a lot of packages (how large is your `Project.toml` file?).

Does the status bar update itself as it indexes through the packages? Or is it stuck at a particular package (like say `BioAlignments`).

---

<div class="post-metadata">

**Author:** ![Donut\_Meepo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donut_meepo/32/9085_2.png) [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Post date:** [June 17, 2020, 4:28am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/3 "2020-06-17T04:28:48Z")

</div>

Hi, it never ends indexing. At least for the couple hours I am using the VS code. Where can I look for the Project.toml? Yes. It always stuck at the BioAlignments.

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [June 17, 2020, 4:31am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/4 "2020-06-17T04:31:20Z")

</div>

If you are developing a package, I would suggest only use the local environment in the project. From your screenshot I can see it is indexing your global environment. So it takes long. Consider adding this to your `startup.jl`?

```julia
using Pkg

if isfile("Project.toml")
    Pkg.activate(".")
end

```

Open VSCode directly from that folder where `Project.toml` locates, then VSCode will use the local environment per project.

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [June 17, 2020, 7:03pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/5 "2020-06-17T19:03:35Z")

</div>

I don’t think that’s the problem since apparently it’s stuck at a single package. Maybe it does take long to index that package but definitely not a few hours.

Could you show the “Output” tab of the “Language Server Extension”

---

<div class="post-metadata">

**Author:** ![Donut\_Meepo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donut_meepo/32/9085_2.png) [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Post date:** [June 18, 2020, 12:00am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/6 "2020-06-18T00:00:26Z")

</div>

It has no progress at least for 2 hours.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/5/85464bf84f140ab40595747bad9bb6815d769334.png)

---

<div class="post-metadata">

**Author:** ![ranocha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ranocha/32/35588_2.png) [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Post date:** [June 18, 2020, 12:12pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/7 "2020-06-18T12:12:46Z")

</div>

I can reproduce the same behavior on Ubuntu 20.04. For me, VSCode gets stuck in `DataFrames.jl` or `DifferentialEquations.jl`.

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [June 18, 2020, 2:53pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/8 "2020-06-18T14:53:24Z")

</div>

Do any of you have `Revise.jl` in your Project.toml file? Sometimes Revise can prevent indexing… If I were you, I’d just delete the `.julia` folder, and start again (copy your Project.toml folder so you don’t have to manually enter in all the packages – but make sure to remove the `Revise.jl` entry).

---

<div class="post-metadata">

**Author:** ![logospathos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/logospathos/32/16325_2.png) [@logospathos](https://discourse.julialang.org/u/logospathos)\
**Post date:** [July 11, 2020, 12:56pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/9 "2020-07-11T12:56:26Z")

</div>

I had the same problem on Lubuntu 20.04. For me, VS Code gets stuck in `DifferentialEquations.jl` at first time, and `RCall.jl` at the next.

I found a workaround, though it is not a smart way at all: letting Language Server be indexing on another environment which has less packages as follows.

```julia
julia> using Pkg
julia> Pkg.generate("DummyPackageForIndexing")
 Generating project DummyPackageForIndexing:
...
(@v1.4) pkg> activate ./DummyPackageForIndexing/
...
(DummyPackageForIndexing) pkg> add DifferentialEquations
...
(DummyPackageForIndexing) pkg>

```

then, click “Julia env” on the (bottom left) status bar of VSCode, pick the created folder(in this case, “`DummyPackageForIndexing`”) to select the environment.  
After that, Julia Language Server starts indexing the package added to the local environment, but it finishes much faster than in the previous case.  
(So it seems that indexing packages got stuck in the previous case.)

Once Language Server finished indexing all the package added to a local environment, indexing the packages doesn’t happen either on the environment or the other environments including my global environment.

In this ways, I got able to use Intellisence to all the packages I had added on the global environment, including `Revise.jl`.  
But I had to repeat the process to each package I had added to the global environment.

For your information.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [July 11, 2020, 6:27pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/10 "2020-07-11T18:27:32Z")

</div>

I don’t know where mine stucks, but it’s stucking all the times. Once it was consuming all my 32 GB of RAM.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [July 11, 2020, 8:02pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/11 "2020-07-11T20:02:15Z")

</div>

> [@Donut\_Meepo](#):
>
> Julia extension

It seems that the Julia extension of VS code always has this problem. Hope the team will fix this.

---

<div class="post-metadata">

**Author:** ![Donut\_Meepo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donut_meepo/32/9085_2.png) [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Post date:** [July 12, 2020, 2:24am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/12 "2020-07-12T02:24:24Z")

</div>

I reinstalled Julia since I could not get the problem fixed. So far (~a month of usage and with a handful of package installed), I did not get the same issue. But I don’t know whether it will come up again…

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [November 9, 2020, 7:47pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/13 "2020-11-09T19:47:45Z")

</div>

I’m having a similar problem it doesn’t mention any packages, just says indexing Juila, and I get a notice that Julia crashed.

 ![Screenshot (107)](https://global.discourse-cdn.com/julialang/original/3X/b/1/b176a32b12d991a47800f296cadfc37b74589872.png)

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [November 9, 2020, 9:03pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/14 "2020-11-09T21:03:54Z")

</div>

It’s indexing your entire Julia 1.5 global packages, as shown in lower left corner.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [November 9, 2020, 9:05pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/15 "2020-11-09T21:05:57Z")

</div>

Do I just wait then? I had an error message, if you check my new post, it still says it’s indexing, and that it crashed, but now the things I’m trying to do work, and I’m not getting any error messages.

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [November 10, 2020, 12:25am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/16 "2020-11-10T00:25:25Z")

</div>

My suggestion is that if you are developing a package, or run in a local directory, select the environment of that local directory, which usually has limited packages to index so it will be faster.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [November 10, 2020, 12:53am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/17 "2020-11-10T00:53:40Z")

</div>

Not sure what you mean about developing a package, but I am out in the country with a cell phone connection.

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [November 10, 2020, 4:38am UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/18 "2020-11-10T04:38:23Z")

</div>

I don’t think it has something to do with your connection? Everything should be done locally. When I say “developing a package”, I basically mean a project: [4. Working with Environments · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/environments/#Creating-your-own-projects-1) and [9. Glossary · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/glossary/)

And each project can have an environment, use that environment. Not the global v1.5 one.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [November 10, 2020, 4:07pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/19 "2020-11-10T16:07:15Z")

</div>

I had similar issues, which were apparently the result of using a custom sysimage. After running  
`PackageCompiler.restore_default_sysimage()` , I don’t get that issue any more. As far as why/how that fixes the problem - someone much smarter than I would have to weigh in.

thought on this post by @Derek_Vetsch?

---

<div class="post-metadata">

**Author:** ![Derek\_Vetsch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derek_vetsch/32/8552_2.png) [@Derek\_Vetsch](https://discourse.julialang.org/u/Derek_Vetsch)\
**Post date:** [November 10, 2020, 4:20pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576/20 "2020-11-10T16:20:11Z")

</div>

I would agree with @singularitti. I would not recommend opening up VS Code and firing up Julia - you want to open a folder in your workspace. If you look in the bottom left of your screenshot - you are using your entire Julia 1.5 environment. You want to create an environment in the folder you are working in using `Pkg.activate`. By doing that, Julia will only need to index the packages that you have added in your Project.toml file - which will go much faster.

[Next page](https://discourse.julialang.org/t/vs-code-julia-language-server-indexing/41576.md?page=2)
