Debug localhost APIs via remote URLs with Visual Studio Dev Tunnels

Have you used Dev Tunnels in Visual Studio yet?

Devs tunnels allow us to expose (and debug) our localhost APIs via remote URLs.

Previously when integrating into a third party service provider which had webhooks or callbacks to notify our apps that some event has happened we needed a publicly accessible URL. For a lot of devs this meant actually having to deploy to Azure app service or wherever to check if our methods which process the callback worked.

With Visual Studio now we can create a Dev Tunnel which will create a remote URL pointer into a running localhost instance. We can then put this URL into the 3rd party webhook config and have our localhost breakpoints fired when the remote URL is hit which is a much enhanced local dev flow.

I ❤ this feature, it’s been a big time saver for us.
Have you used Dev Tunnels yet?

Dev tunnels in Visual Studio 2022 | Microsoft Learn

Leave a Reply

Your email address will not be published. Required fields are marked *