Skip to content

Fix: Log actual API port when configured with port 0 #1573

@waldekmastykarz

Description

@waldekmastykarz

Bug

When starting Dev Proxy with --api-port 0, the log message shows the unresolved port 0 instead of the actual assigned port.

Steps to reproduce

devproxy --as-system-proxy false --port 0 --api-port 0

Current behavior

Dev Proxy API listening on http://127.0.0.1:0...
Dev Proxy listening on 127.0.0.1:49978...

Expected behavior

Dev Proxy API listening on http://127.0.0.1:49977...
Dev Proxy listening on 127.0.0.1:49978...

The proxy port is logged correctly after resolution, but the API port shows 0.

Location

The log message is in DevProxy/Commands/DevProxyCommand.cs around line 263.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions