Ripster

Ripster

Intellij-elixir phoenix debugger error

I’m trying to setup intellij to give it a try but I’m having trouble getting it working with Phoenix.
I have created a new Run/Debug configuration, set my program arguments to phx.server. When I run the project using the debug button it appears to run but when I visit the page I’m greeted with the error Internal server error. The console in intellij shows this:

[info] Running WebsiteWeb.Endpoint with Cowboy using http://0.0.0.0:4000
23:22:31 - info: compiled 6 files into 2 files, copied 3 in 587 ms
[info] GET /
[debug] Processing with WebsiteWeb.PageController.index/2
  Parameters: %{}
  Pipelines: [:browser]
[info] Sent 200 in 46ms
[info] Sent 500 in 66ms
[error] #PID<0.549.0> running WebsiteWeb.Endpoint terminated
Server: 0.0.0.0:4000 (http)
Request: GET /
** (exit) {%ArgumentError{message: "argument error"}, []}

Oddly enough when I run the project using the same configuration by clicking the “run” button in intellij it works perfectly fine.

Is there something I’m missing or have misconfigured? I’d like to be able to set break points and use the debugger.

Marked As Solved

KronicDeth

KronicDeth

Given no other information and since the logger doesn’t show the error, I’m going to guess it is this bug, which was actually a bug with Logger, which turned out to be a bug with :dbg_ieval, which is part of the debugger in OTP. @josevalim fixed the :dbg_ieval bug, but that means you need to wait until the next version of OTP to be released to get the fix (or erlc just that module to get the fix).

You can work around the problem for now by excluding modules from being interpreted that trigger the bug. In most cases this will be modules that have Logger calls that take an anonymous function and then interpolate inside that anonymous function like

thing = ...
Logger.info(fn -> "thing=#{thing}" end)

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement