This package implements an extension to the error view shown in Phoenix applications, adding a fully-interactive IEx shell. Here's a video of me triggering an error in a Phoenix application and then poking around a little bit using the live debug console:
Screen.Recording.2022-09-09.at.12.03.09.mov
-
This package currently requires that your application uses a bleeding edge development build of Phoenix which has phoenixframework/phoenix#4938 applied.
-
Install the package by adding
phoenix_live_debug_console
to your list of dependencies inmix.exs
:
def deps do
[
{:phoenix_live_debug_console, "~> 0.1"}
]
end
- Configure the endpoint of your application such that
debug_errors
anddebug_error_handlers
are set as follows:
config :my_app, MyAppWeb.Endpoint,
debug_errors: true,
debug_banner_hooks: [{PhoenixLiveDebugConsole, :render_console, []}]
This library was written by Frerich Raabe, however it is really just standing on the shoulders of giants:
- Underthehood is what implements the IEx terminal
- Phoenix LiveDashboard served as an inspiration for developing an extension package which comes with its own assets.