Skip to content

An add-on to Phoenix application which provides an interactive IEx shell in the error view.

License

Notifications You must be signed in to change notification settings

frerich/phoenix_live_debug_console

Repository files navigation

Phoenix LiveDebugConsole

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

Installation

  1. This package currently requires that your application uses a bleeding edge development build of Phoenix which has phoenixframework/phoenix#4938 applied.

  2. Install the package by adding phoenix_live_debug_console to your list of dependencies in mix.exs:

def deps do
  [
    {:phoenix_live_debug_console, "~> 0.1"}
  ]
end
  1. Configure the endpoint of your application such that debug_errors and debug_error_handlers are set as follows:
config :my_app, MyAppWeb.Endpoint,
  debug_errors: true,
  debug_banner_hooks: [{PhoenixLiveDebugConsole, :render_console, []}]

Credits

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.

About

An add-on to Phoenix application which provides an interactive IEx shell in the error view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published