Spawns multiple code_helper processes and beam.smp with extremely high CPU usage.
I had to disable this excellent extension on VSCode because it was causing such high CPU usage, it would freeze my entire computer.
In Activity Monitor, I see about 9 Code Helper processes, and a beam.smp with around %200+ CPU usage. Force quitting VSCode and terminating all code helper processes immediately fixed the issue.
To reproduce just try to save any Elixir file with bugs, typos or calling non-existing functions with formatOnSave enabled. It'll show red squiggly lines, right. And after that, fix the issues and save, after a few minutes you'll see the slowdown start to ramp up until the computer is unusable.
Unfortunately I can't provide more details than that because I'm not sure what kind of debug info you need.
I hope you can reproduce the issue and find the root cause, I love this extension!
Hm. Can you post a project repo on Github that reproduces it?
My first guess with high CPU usage is to blame Dialyzer. Try setting elixirLS.dialyzerEnabled to false and see if it remains a problem. Usually, you'll see high CPU usage during the initial PLT generation and project analysis on big projects, but after the initial analysis it isn't usually a problem.
I'm not sure what the "code helper" processes are, they're either spawned by VS Code itself or another extension.
I agree, great extension. Unfortunately, I'm seeing this as well with elixirLS.dialyzerEnabled set to false.
Check the output log by opening View > Output and selecting "ElixirLS" in the dropdown. Is there anything there that looks relevant?
I get the problem of extremely high memory usage by beam.smp. I set elixirLS.dialyzerEnabled to false and that fixed the problem for me.
I would add that with the default settings, I didn't see anything unusual in the View > Output of "ElixirLS".
To follow up on this, a full restart with elixirLS.dialyzerEnabled to false did address the high CPU issue. I initially tried a reload and that did not work for me.
This did fix some of my projects, but not all. One project I'm working on has a custom template compiler, and currently, it recompiles the target templates without looking to see if there were actual changes. This compiler generates new output templates which trigger ElixirLS to re-compile and the hamster wheel goes around again.
We essentially want to ignore file changes that are a result of compiling. Would it be possible to ignore changes while compiling for such situations? Or, perhaps a configurable compilation hold-off?
@dsnider vscode-elixir-ls sets up filesystem watchers here using createFileSystemWatcher. Fortunately, vscode allows to exclude files from watchers created using that function. You need to set files.watcherExclude in your vscode config to stop the watcher from picking up changes for .*ex files you're generating during compilation, and then infinite compile will stop.
I was having the same issue with a veeery simple directory, just a .exs file with a module and another with tests (code katas from exercism).
At first ElixirLS was raising an error due to the lack of a mix.exs file. I was just ignoring it as I didn't need a whole mix project.
But then I made a try and created a another mix project to see if I could play a little the debugger feature. ElixirLS kicked, generated PLT and I could use some of the features (unfortunatelly didn't figured out how to setup the debugger).
The issue happened after all that in another simple project (again - only 2 .exs files), for some reason, having used the extension in a full mix project didn't raise the error, but it raised the CPU usage to the clouds! My MBP fan went nuts and CPU usage was constantly around 100%
I'll try to disable and reenable dialyzer to see if something changes.
There was a dialyzer bug that caused infinite analysis triggered by code in elixir 1.7.0. Please make sure you use 1.7.1 or 1.6.x to eliminate this particular issue.
Fantastic, seems to have solved the issue...
As they would say here in Brazil: "Ahhh moleke!!!" 😄
vc ta me tirando rapaz!? jajaja
Thanks dudes, great job!
The issue still persists on Elixir 1.7.2 (compiled with Erlang/OTP 20). I'm using Fedora Linux with Neovim and ALE plugin. How can I disable elixirLS.dialyzerEnabled? There's no config.json file in the "elixir-ls/rel" folder.
UPDATE: I fixed it. I found this in the ALE documentation:
g:ale_elixir_elixir_ls_config g:ale_elixir_elixir_ls_config b:ale_elixir_elixir_ls_config Type: |Dictionary| Default:
{}Dictionary containing configuration settings that will be passed to the language server. For example, to disable Dialyzer: > { \ 'elixirLS': { \ 'dialyzerEnabled': v:false, \ }, \ } < Consult the ElixirLS documentation for more information about settings.
I'm just wondering is there any disadvantages on disabling the dialyzer?
just getting my feet wet with elixir, installed the plugin and having the same issues.
Dialyzer is not ready for primetime and breaks down frequently. I suggest disabling dialyzer. Here's how to do it in VSCode: https://dev.to/sergio/setting-up-vs-code-for-elixir-development-59aa
Having similar issues, also disabling dialyzer helps but after some time VS Code loses the ability for code completion. After enabling I have the following picture
Initial indexing
After indexing finished
It takes some time to wrap up indexing.

Jump to source
System specs
- OS: OSX Mojave 10.14.2,
- Elixir: 1.7.4 (compiled with Erlang/OTP 21),
- VS Code: 1.30.1,
- Project type: umbrella project, contains phoenix applications, separate ecto repository (https://github.com/lbrty/secure-idp-backend),
I suspect this is related to an open VS Code Issue. My CPU spikes even when extensions are disabled, and even when I'm saving changes to package.json.
Was having the CPU pegging issue, as well. Using vim + ALE. The comment that @zoliky made pointing towards the ALE ElixirLS option to disable Dialyzer solved the CPU pegging issue.
Recent ALE issue related to this: https://github.com/w0rp/ale/issues/2397
This project has moved!
It's now being maintained by proactive volunteers from the Elixir community over at elixir-lsp/elixir-ls. Updates will continue to be published from that repo to the original VS Code extension, so no need to switch plugins if you're using VS Code.
To avoid inundating the new maintainers with issues, please verify that your issue persists with the latest version of the extension (which is published from the new repo) before re-filing your issue there.
Thanks for using ElixirLS!