Skip to content

Feature: Add :auto_port and :ignore_startup_errors configs#950

Merged
hhubert6 merged 5 commits intomainfrom
948-add-option-to-choose-the-next-available-port-in-the-event-of-a-port-conflict
Mar 13, 2026
Merged

Feature: Add :auto_port and :ignore_startup_errors configs#950
hhubert6 merged 5 commits intomainfrom
948-add-option-to-choose-the-next-available-port-in-the-event-of-a-port-conflict

Conversation

@hhubert6
Copy link
Contributor

No description provided.

@hhubert6 hhubert6 force-pushed the 948-add-option-to-choose-the-next-available-port-in-the-event-of-a-port-conflict branch from b431924 to 0ba09ef Compare March 11, 2026 14:56
@hhubert6 hhubert6 requested a review from Copilot March 11, 2026 15:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configuration options to make LiveDebugger startup more resilient in host applications by (1) optionally auto-selecting an available TCP port and (2) optionally preventing endpoint startup failures from crashing the entire application.

Changes:

  • Introduces LiveDebugger.App.Web.EndpointStarter to optionally ignore endpoint startup errors (:ignore_startup_errors).
  • Adds :auto_port support to scan for the next available TCP port and propagates the resolved port into generated tags.
  • Documents the new port-conflict handling options in docs/config.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
lib/live_debugger/app/web/endpoint_starter.ex New wrapper child that can return :ignore on endpoint start failure when configured.
lib/live_debugger/app.ex Switches the supervised endpoint child from Endpoint to EndpointStarter.
lib/live_debugger.ex Adds auto-port selection, returns/uses resolved port for tag generation, and updates tag resolution logic.
docs/config.md Documents auto_port and ignore_startup_errors behaviors and examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Member

@kraleppa kraleppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🦈 I'd add some tests, if possible

@hhubert6 hhubert6 requested review from kraleppa and srzeszut March 12, 2026 11:42
Copy link
Contributor

@srzeszut srzeszut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@hhubert6 hhubert6 requested a review from srzeszut March 12, 2026 15:12
@hhubert6 hhubert6 merged commit ef22ec4 into main Mar 13, 2026
4 checks passed
@hhubert6 hhubert6 deleted the 948-add-option-to-choose-the-next-available-port-in-the-event-of-a-port-conflict branch March 13, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to choose the next available port in the event of a port conflict

4 participants