tsuyoshi84

tsuyoshi84

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?

Showing Posts 1 to 9

sribe

sribe

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

KronicDeth

KronicDeth

If that is the complete command line, then it looks like it is using the fallback erl invocation when your Elixir SDK and it’s Erlang SDK are not setup for the project. Make sure those are setup using the Import Project From External Model (Mix) in the README. If they are setup correctly you’ll see a bunch of -pa ...ebin flags after erl adding the paths to Erlang and Elixir before starting elixir start_cli

tsuyoshi84

tsuyoshi84 OP

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

tsuyoshi84

tsuyoshi84 OP

Thank you for your advice!
I made sure that I set up the project as README mentioned, but it doesn’t work. If I figure out what’s wrong later, I’ll let you know.

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 OP

Thank you for your detailed explanation. I made sure each settings.

Verify you have an Elixir SDK
Verify you have an Internal Erlang SDK on the Elixir SDK

Verify the Elixir SDK has both Elixir and Erlang ebin directories like …/elixir/ebin and erlang/lib/kernel-5.4.1/ebin

I checked the following directories exist:

/Users/tsuyoshi.yamaguchi/.kiex/elixirs/elixir-1.6.5/lib/elixir/lib/elixir/ebin
~/erlang/20.3/lib/kernel-5.4.3/ebin

Verify Project SDK is the Elixir SDK?

Click each Module and verify they also have the Elixir SDK set.

Run/Debug configuration is set:

I think all settings seem to be set correctly, but it still shows the same error.
BTW, I’m using Kiex as an Elixir version management tool. Do you think it could possibly be the cause of the problem?

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.

tsuyoshi84

tsuyoshi84 OP

You’ve hit the nail!

I checked Classpath, and it turned out ebin paths was not set at all. After setting ebin paths manually, the debug mode worked out.

I looked around some source code of the IntelliJ plugin, and apparently the path to the ebin directories are different from the path expected when using Kiex, so I guess that would be the cause.

I really appreciate your advice anyway. Thank you!

seanwash

seanwash

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

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews