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

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
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

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
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
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
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

We're in Beta

About us Mission Statement