jswny

jswny

Debugging processes in LiveBook

I’m trying to test out some supervision stuff with GenServers in LiveBook. I’ve easily managed to start the GenServers, which I assume are running under some master LiveBook supervisor.

My question is; how do you debug a process running in the background in LiveBook? As far as I can tell, there’s no way to access the console in LiveBook. So how can I debug this without console access?

I need to send it messages and normally I’d just have it print out some results to the console when it get the message and processes it.

Marked As Solved

axelson

axelson

Scenic Core Team

Have you tried doing a Logger.info call from a process? I think that should get printed out by Livebook (at least it does in NervesLivebook and I don’t think it is setting up anything special there).

Also Liked

cmo

cmo

You could probably start observer to see if your theory about the supervision tree is true.

You can start an iex shell iex --sname coolname --cookie monster -S mix and then attach your livebook session to that.

And, can’t you just send messages to your GenServer from livebook anyway? Throw some inspect/puts/Logger.debug and you should see that in livebook.

jswny

jswny

Wow that’s awesome! Thanks for the tip! I never would have thought to use Logger! It’s a bit odd that it runs in whatever cell was evaluated last but it works!

Where Next?

Popular in Questions Top

New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

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
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement