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
* TODO: @alexr00 no one is currently using this. Should we delete it?
73
+
* If your {@link PortAttributesProvider PortAttributesProvider} is registered after your process has started then already know the process id of port you are listening on.
74
+
* Specifying a pid will cause your provider to only be called for ports that match the pid.
75
+
*/
76
+
pid?: number;
77
+
78
+
/**
79
+
* Specifying a port range will cause your provider to only be called for ports within the range.
80
+
*/
81
+
portRange?: [number,number];
82
+
83
+
/**
84
+
* TODO: @alexr00 no one is currently using this. Should we delete it?
85
+
* Specifying a command pattern will cause your provider to only be called for processes whose command line matches the pattern.
86
+
*/
87
+
commandPattern?: RegExp;
88
+
}
89
+
52
90
exportnamespaceworkspace{
53
91
/**
54
92
* If your extension listens on ports, consider registering a PortAttributesProvider to provide information
55
93
* about the ports. For example, a debug extension may know about debug ports in it's debuggee. By providing
56
94
* this information with a PortAttributesProvider the extension can tell the editor that these ports should be
57
95
* ignored, since they don't need to be user facing.
58
96
*
59
-
* @param portSelector If registerPortAttributesProvider is called after you start your process then you may already
60
-
* know the range of ports or the pid of your process. All properties of a the portSelector must be true for your
61
-
* provider to get called.
62
-
* The `portRange` is start inclusive and end exclusive.
63
-
* The `commandPattern` is a regular expression that will be matched against the command line of the process.
64
-
* @param provider The PortAttributesProvider
97
+
* The results of the PortAttributesProvider are merged with the user setting `remote.portsAttributes`. If the values conflict, the user setting takes precedence.
98
+
*
99
+
* @param portSelector It is best practice to specify a port selector to avoid unnecessary calls to your provider.
100
+
* If you don't specify a port selector your provider will be called for every port, which will result in slower port forwarding for the user.
101
+
* @param provider The {@link PortAttributesProvider PortAttributesProvider}.
0 commit comments