tsuyoshi84

tsuyoshi84

Debugging with IntelliJ fails

I’ve been trying to debug just a simple Phoenix application with IntelliJ, but it doesn’t work.

Firstly, I created a “hello” Phoenix application with the following command.

mix phx.new hello --no-ecto --no-brunch

Then, I created a IntelliJ project by importing the source code and set up the Run/Debug configurations. However, when I try to run the project, it shows the following messages.

/Users/tsuyoshi.yamaguchi/erlang/20.3/bin/erl -noshell -s elixir start_cli -extra /Users/tsuyoshi.yamaguchi/.kiex/elixirs/elixir-1.6.5/bin/mix phx.server
{“init terminating in do_boot”,{undef,[{elixir,start_cli,,},{init,start_em,1,},{init,do_boot,3,}]}}
init terminating in do_boot ({undef,[{elixir,start_cli,,},{init,start_em,1,},{init,do_boot,3,}]})

Crash dump is being written to: erl_crash.dump…done

I read this post and checked my configurations, but it seems fine.

Is there any idea what is the problem?

First Post!

sribe

sribe

IIRC, I never got debugging working in IntelliJ, but it did work in VS Code.

Most Liked

KronicDeth

KronicDeth

Check that your SDKs are setup. They should have been created during the import if missing:

  1. File > Project Structure
  2. Click Platform Settings > SDKs
  3. Verify you have an Elixir SDK
  4. Click the Elixir SDK
  5. Verify you have an Internal Erlang SDK on the Elixir SDK
  6. Verify the Elixir SDK has both Elixir and Erlang ebin directories like .../elixir/ebin and erlang/lib/kernel-5.4.1/ebin
  7. Click Project Settings > Project
  8. Verify Project SDK is the Elixir SDK?
    9 .Click Project Settings > Modules
  9. Click each Module and verify they also have the Elixir SDK set.
tsuyoshi84

tsuyoshi84

Thank you! I made sure VS Code provides the debug capability and it works :slight_smile:

KronicDeth

KronicDeth

Sorry, I didn’t mean to imply check they exist on-disk. I mean that they should appear in your Classpath tab. Here’s what it looks like locally for me, using homebrew:

I’m going to guess that something is missing with the kiex and/or kerl support. You should be able to work-around this issue by manually adding the ebin directories using the + button the Classpath tab.

Last Post!

seanwash

seanwash

This just helped me out. Thanks for posting your solution!

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement