diff --git a/README.md b/README.md index fd18bfa92..0f0206394 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,21 @@ Add `live_debugger` to your list of dependencies in `mix.exs`: ```elixir defp deps do [ - {:live_debugger, "~> 0.1.4", only: :dev} + {:live_debugger, "~> 0.1.5", only: :dev} ] end ``` +For full experience we recommend adding below line to your application root layout. It attaches `meta` tag and LiveDebugger scripts in dev environment enabling browser features. + +```elixir + # lib/my_app_web/components/layouts/root.html.heex + + + <%= Application.get_env(:live_debugger, :live_debugger_tags) %> + +``` + After you start your application LiveDebugger will be running at a default port `http://localhost:4007`. > [!WARNING] @@ -34,23 +44,16 @@ List of browser features: - Debug button - Components highlighting (coming soon!) -Some features require injecting JS into the debugged application. To achieve that you need to turn them on in the config and add LiveDebugger scripts to your application root layout. +Some features require injecting JS into the debugged application. You can disable them in your config. ```elixir # config/dev.exs -config :live_debugger, browser_features?: true -``` +# Disables all browser features and does not inject LiveDebugger JS +config :live_debugger, browser_features?: false -```elixir -# lib/my_app_web/components/layouts/root.html.heex - - - <%= if Application.get_env(:live_debugger, :browser_features?) do %> - - <% end %> - +# Disables only debug button +config :live_debugger, debug_button?: false ``` ### Content Security Policy @@ -67,14 +70,14 @@ In `router.ex` of your Phoenix app, make sure your locally running Phoenix app c ## Igniter -LiveDebugger has [Igniter](https://github.com/ash-project/igniter) support - an alternative for standard mix installation. It'll automatically add LiveDebugger scripts to `root.html.heex` and enable browser features in your `config/dev.exs` after you use the below command. - -Make sure that added dependency is `:dev` only. +LiveDebugger has [Igniter](https://github.com/ash-project/igniter) support - an alternative for standard mix installation. It'll automatically add LiveDebugger dependency and modify your `root.html.heex` after you use the below command. ```bash mix igniter.install live_debugger ``` +Make sure that added dependency is `:dev` only. + ## Optional configuration ```elixir diff --git a/mix.exs b/mix.exs index 01d4fa29c..dced7f73a 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule LiveDebugger.MixProject do use Mix.Project - @version "0.1.4" + @version "0.1.5" def project do [