An open API service indexing awesome lists of open source software.

https://github.com/software-mansion-labs/live-debugger


https://github.com/software-mansion-labs/live-debugger

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        

# LiveDebugger

## Installation

Add `live_debugger` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:live_debugger, git: "[email protected]:software-mansion-labs/live-debugger.git", tag: "v0.0.3", only: :dev}
]
end
```

Then you need to configure `LiveDebugger.Endpoint` similarly to `YourApplication.Endpoint`

```elixir
# config/dev.exs

config :live_debugger, LiveDebugger.Endpoint,
http: [port: 4007], # Add port on which you want debugger to run
secret_key_base: , # Generate secret using `mix phx.gen.secret`
live_view: [signing_salt: "your_signing_salt"],
adapter: Bandit.PhoenixAdapter # Change to your adapter if other is used
```

Live debugger will be running at separate port which you've provided e.g. http://localhost:4007 .

## Adding button

For easy navigation add the debug button to your live layout. Remember to use it only in `:dev` environment if `:live_debugger` is installed as `only: :dev`.

```Elixir
# lib/my_app_web/components/app.html.heex

<%= if Mix.env() == :dev do %>

<% end %>
{@inner_content}

```

## Contributing

For those planning to contribute to this project, you can run a dev version of the debugger with the following commands:

```bash
mix setup
iex -S mix
```

It'll run application declared in `dev/` directory with library debugger installed.

LiveReload is working both for `.ex` files and static files, but if some styles won't show up, try using this command

```bash
mix assets.build
```

### Heroicons

Heroicons are not used as dependency but copied from [Heroicons](https://github.com/tailwindlabs/heroicons) .
To copy them you can use `copy_heroicons.sh` script which requires you to have heroicons cloned in folder next to `live_debugger` folder.