https://github.com/software-mansion-labs/live-debugger
https://github.com/software-mansion-labs/live-debugger
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/software-mansion-labs/live-debugger
- Owner: software-mansion-labs
- Created: 2024-12-04T10:23:16.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T10:10:46.000Z (4 months ago)
- Last Synced: 2025-02-03T10:34:13.635Z (4 months ago)
- Language: Elixir
- Size: 510 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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.exsconfig :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.