Ripster
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.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
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
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
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New
Other Trending Topics
Part two of two. Part one covered scale and operations; this one covers the tooling that keeps a large codebase navigable.
The practical...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
You can’t do this in any available IDE, also there is not much effort put into this as step-by-step-debugging has a lot of drawbacks in the concurrent world.
There are tools available in the erlang eco-system that do allow to do step-by-step debugging, but I never used them with elixir. Also I only tried once or twice with erlang, I realized nearly instantly that I am not able to analyze where, what and why I am doing during the timeouts of dependent processes and so during debugging the main reason for failure was simply me not beeing able to debug in nanoseconds…
drl123
@Ripster I’m seeing the same behavior in IntelliJ CE and Rubymine when debugging a Phoenix app. However it works fine when just a regular Elixir app. The endpoint is terminating as soon as the browser makes a request. Suggest you post an issue on the plugin’s GitHub page. @KronicDeth is usually pretty quick to respond. I could be that this just isn’t supported as @NobbZ said, or could just be a bug in the plugin.
Ripster
Thanks. I will try the GitHub page. The reason I expected it to work is that the GitHub page explicitly mentions Phoenix as well as breakpoints and stepping. There are even screenshot examples of setting breakpoints in Intellij so I do expect there is a bug or something wrong with my setup.
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_ievalbug, but that means you need to wait until the next version of OTP to be released to get the fix (orerlcjust 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
Loggercalls that take an anonymous function and then interpolate inside that anonymous function likeRipster
Excluding
WebsiteWeb.Endpointseems to have fixed it. I don’t have any explicit calls to the logger but it doesuse Phoenix.Endpointand have calls to plug, both of which I believe have Logger calls with interpolated anonymous functions in them.Thank you very much for taking time to explain the issue and help get it fixed!