Interface PortAttributesProvider

A provider of port attributes. Port attributes are used to determine what action should be taken when a port is discovered.

interface PortAttributesProvider {
    providePortAttributes(attributes, token): ProviderResult<PortAttributes>;
}

Methods

  • Provides attributes for the given port. For ports that your extension doesn't know about, simply return undefined. For example, if providePortAttributes is called with ports 3000 but your extension doesn't know anything about 3000 you should return undefined.

    Parameters

    • attributes: {
          commandLine?: string;
          pid?: number;
          port: number;
      }
      • Optional commandLine?: string
      • Optional pid?: number
      • port: number
    • token: CancellationToken

      A cancellation token that indicates the result is no longer needed.

    Returns ProviderResult<PortAttributes>