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
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
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
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!








