You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,38 @@ config :live_debugger,
81
81
external_url:"http://your_external_url"
82
82
```
83
83
84
+
## Port Conflict Handling
85
+
86
+
LiveDebugger provides two options for dealing with port conflicts (e.g. when running multiple application instances).
87
+
88
+
### Auto-select next available port
89
+
90
+
Set `auto_port: true` to make LiveDebugger automatically find the next free port if the configured port is already in use:
91
+
92
+
```elixir
93
+
# config/dev.exs
94
+
95
+
config :live_debugger,
96
+
port:4007,
97
+
auto_port:true
98
+
```
99
+
100
+
LiveDebugger will try up to 3 consecutive ports starting from the configured one, logging a warning for each port that is skipped.
101
+
102
+
Note: `auto_port` is ignored when using a Unix socket (`ip: {:local, path}`).
103
+
104
+
### Ignore startup errors
105
+
106
+
Set `ignore_startup_errors: true` to allow the host application to continue running even if LiveDebugger fails to start (e.g. due to a port conflict). LiveDebugger will be unavailable, but your application will not crash:
An error will be logged when startup fails. Both options can be combined: `auto_port` is attempted first, and if the endpoint still fails to start, `ignore_startup_errors` prevents the crash.
0 commit comments