Skip to content

Prevent DTD from cluttering the VS Code Ports section with previously forwarded ports #5403

@tschaffter

Description

@tschaffter

Is your feature request related to a problem? Please describe.
The DTD process listens on a random port when it starts. VS Code automatically forwards this port and lists it in the Ports section of the IDE. Each time VS Code is closed and reopened, a new DTD process starts, and a new port is forwarded. Over time, this leads to an accumulation of previously forwarded ports, making it difficult to identify the ports of interest.

Image

Describe the solution you'd like
It is possible to specify the port that DTD listens to. The solution would be to allow the Dart VS Code extension to configure this port in settings.json. This way, DTD will always listen on the same port, preventing clutter in the Ports section.

https://github.com/dart-lang/sdk/blob/d209ea93337ce858359abc50ebed428a0eab0a41/pkg/dtd_impl/lib/dart_tooling_daemon.dart#L34-L37

Describe alternatives you've considered
I searched the existing options exposed by this VS Code extension for "DTD," "daemon," and "port" but couldn't find an option that allows passing additional parameters to the command that starts DTD.

const daemonArgs = [
"tooling-daemon",
"--machine",
];

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    in dtdRelates to integration with the Dart Tooling Daemonis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions