Skip to content

Commit 7f741c8

Browse files
narzachaxelson
andauthored
Update README re: setting "debug_info" in Mix project config (#188)
* Update README re: setting "debug_info" in Mix project config * Update README.md Co-authored-by: Jason Axelson <[email protected]>
1 parent 5c66dd7 commit 7f741c8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,28 @@ If you run into issues with the extension then try these debugging steps:
7676
- Stop your editor, remove the entire `.elixir_ls` directory, then restart your editor
7777
- NOTE: This will cause you to have to re-run the entire dialyzer build
7878

79+
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:
80+
81+
```
82+
elixirc_options: [debug_info: Mix.env() == :dev]
83+
```
84+
85+
For example:
86+
87+
```
88+
defmodule MyApp.MixProject do
89+
use Mix.Project
90+
91+
def project do
92+
[
93+
app: :my_app,
94+
version: "0.1.0",
95+
elixir: "~> 1.7",
96+
elixirc_paths: elixirc_paths(Mix.env()),
97+
elixirc_options: [debug_info: Mix.env() == :dev],
98+
...
99+
```
100+
79101
### Check ElixirLS Output
80102

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

0 commit comments

Comments
 (0)