Skip to content

Commit

Permalink
Update README re: setting "debug_info" in Mix project config (#188)
Browse files Browse the repository at this point in the history
* Update README re: setting "debug_info" in Mix project config

* Update README.md

Co-authored-by: Jason Axelson <[email protected]>
  • Loading branch information
narzach and axelson authored May 23, 2021
1 parent 5c66dd7 commit 7f741c8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,28 @@ If you run into issues with the extension then try these debugging steps:
- Stop your editor, remove the entire `.elixir_ls` directory, then restart your editor
- NOTE: This will cause you to have to re-run the entire dialyzer build

If you are seeing the message "Invalid beam file or no abstract code", you need to make sure that your Mix project is set to use the `elixirc` compiler option `--debug-info`, which can be done by adding the following line to your `mix.exs` `project` section:

```
elixirc_options: [debug_info: Mix.env() == :dev]
```

For example:

```
defmodule MyApp.MixProject do
use Mix.Project
def project do
[
app: :my_app,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [debug_info: Mix.env() == :dev],
...
```

### Check ElixirLS Output

Check the output log by opening `View > Output` and selecting "ElixirLS" in the dropdown.
Expand Down

0 comments on commit 7f741c8

Please sign in to comment.