pfitz
Coming from Objective-C/Swift/PHP/Java I am used to a full IDE for my projects. The one thing I miss the most is a good debugger. So far I just did „poor mans debugging“ with IO.inspect but I am guessing there are better ways to debug ones elixir apps. So how do you debug your apps ?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Hi,
we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
When I use Mix.install with a git dependency, using git@github.com:... how do I change the SSH identity used?
I’ve got two Github accoun...
New
Hello all. I have a question as to best practices for code organization when implementing a liveview with a lot of responsibilities.
Sup...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
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
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #elixirconf-us
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #elixirconf-eu
- #processes
- #security
- #api
- #forms
- #performance










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Qqwy
Because of the ability to run multiple Erlang applications side-by-side in the same process and because of metaprogramming awesomeness, one of the fancy things you can do is
IEX.pry(after yourequire IExin the module) , which starts a shell at that current location in the code, so you can debug the scope you are in.The cool thing about
IO.inspectby the way is that you can plug it in everywhere in your pipelines without altering the result:rvirding
You have to be very careful when debugging things in a concurrent environment, at least when you debug in a more traditional way which stops and controls execution. Anything that is waiting for the debugged process will hang and in many cases may time out and crash, which is not what was intended. Also doing something like
IEx.pryin a function which is called in many processes will also be interesting.Sorry to sound very negative here but having very concurrent systems does change you need to work with them. Sometimes
IO.inspectis all that is reasonable. Or use the built-in tracing facilities.Robert
gausby
I think that we, as a community, need to study our options for inspecting our applications. As others has mentioned in this thread: The Beam is a different beast. Introducing break points changes the program and such.
Personally I have to look into this book: http://www.erlang-in-anger.com. It is another Erlang book, but learning a little bit of Erlang goes a long way :)—it describes strategies for tracing and probing a running Erlang system.
rvirding
Yes, most of that book should be directly applicable to Elixir, with a bit of syntax change. The way systems are built, work and interact are basically the same.
Qqwy
For anyone who reads this topic and doesn’t know about observer:
:observer.startwill make your life easier. It basically is a Task Manager, for inside the BEAM. It gives you a lot of high-level information about what is going on in your system, and it is very useful to, for instance, spot bottlenecks in your message-passing.pfitz
Debugging concurrent apps seem to be a reason why debugging „is so hard“. One the other side: for beginners like me - we do not make concurrent apps from start
- I would argue that debugging could be more easy.
Does one have experience with the erlang debugger
:debugger.startDebugger — OTP 29.0.2 (debugger 7.0) ?
sribe
Yes, I used the Erlang debugger just a bit. There’s a blog post out there about a modification you have to make in order for it to be able to find Elixir sources. Start here, this shows a bit of use, and links to the description of the setup:
aboroska
In the past 6 years I had the opportunity to work with many excellent Erlang developers and nobody used the debugger tool for nothing. I guess two reasons can be behind the lack of interest:
1., Inserting printout in the code is trivial thanks to hot code reloading.
2., Tracing provided by the VM.
There are several options for tracing, for a newish gui you might want try a beta project called erlyberly: How to trace Elixir nodes with Erlyberly « Plataformatec Blog
stephen_m
As above, I do very similar to Qqwy except I log the result. often times with pieces of data from the ENV macro.
Except I use Og, a tiny set of functions that log it instead,
I end up using
__ENV__alot.Not sure if this is good or not though but it’s helped me.