Resolves an external uri, such as a http: or https: link, from where the extension is running to a
uri to the same resource on the client machine.
This is a no-op if the extension is running on the client machine. Currently only supports
https: and http: uris.
If the extension is running remotely, this function automatically establishes a port forwarding tunnel
from the local machine to target on the remote and returns a local uri to the tunnel. The lifetime of
the port forwarding tunnel is managed by VS Code and the tunnel can be closed by the user.
Extensions should not cache the result of asExternalUri as the resolved uri may become invalid due to
a system or user action — for example, in remote cases, a user may close a port forwarding tunnel
that was opened by asExternalUri.
Note that uris passed through openExternal are automatically resolved and you should not call asExternalUri
on them.
Resolves an external uri, such as a
http:orhttps:link, from where the extension is running to a uri to the same resource on the client machine.This is a no-op if the extension is running on the client machine. Currently only supports
https:andhttp:uris.If the extension is running remotely, this function automatically establishes a port forwarding tunnel from the local machine to
targeton the remote and returns a local uri to the tunnel. The lifetime of the port forwarding tunnel is managed by VS Code and the tunnel can be closed by the user.Extensions should not cache the result of
asExternalUrias the resolved uri may become invalid due to a system or user action — for example, in remote cases, a user may close a port forwarding tunnel that was opened byasExternalUri.Note that uris passed through
openExternalare automatically resolved and you should not callasExternalUrion them.