Quality of life reading stacktraces in IEx

46 views
Skip to first unread message

Pedro “noozo” Assunção

unread,
Apr 30, 2024, 1:43:17 PMApr 30
to elixir-lang-core
Hello
Message has been deleted
Message has been deleted

Pedro “noozo” Assunção

unread,
Apr 30, 2024, 1:45:18 PMApr 30
to elixir-lang-core
Hi all, Wdyt of adding a change like this to the Exception module to make reading stacktraces in IEX a little easier on the eye?

Untitled.jpg
On Tuesday, April 30, 2024 at 6:43:17 PM UTC+1 Pedro Assunção wrote:
Hello

Pedro “noozo” Assunção

unread,
Apr 30, 2024, 1:46:02 PMApr 30
to elixir-lang-core
In essence, it would colorize the main application name when reading the stacktrace. (Can't post an example picture because my message gets insta-deleted) It makes it immediately apparent what lines are from the actual application we are coding. The biggest hurdle would be to figure out the "current" error logger color (red) and maybe allow customizing the color of the main app.

Pedro “noozo” Assunção

unread,
Apr 30, 2024, 1:52:52 PMApr 30
to elixir-lang-core
The lazy way i did was in `format_stacktrace_entry({module, fun, arity, location}` compare :application.get_application(self()) with :application.get_application(module). If they are the same, then i do `IO.ANSI.yellow() <> result_of_line_formatting <> IO.ANSI.red()`.
Reply all
Reply to author
Forward
0 new messages