Monitor Visual Studio Dev Tunnel traffic in real-time

Visual Studio Dev Tunnels make testing integration with third party webhooks so easy, but is there a way to inspect all incoming traffic to a particular tunnel?

Yes, thankfully there is a Developer Tools like experience for monitoring all incoming traffic into a Dev Tunnel.

To access it, open the Dev Tunnels window via the View → Other Windows → Dev Tunnels menu. On the Dev Tunnels page, locate the Tunnel URL column (with the app running), click View, and then Inspect:

Visual Studio will then open a page similar to below:


We can see that -inspect has been added to the URL after the port as per the apps launchSettings.json file.

e.g. If we want to inspect:

https://6j9dn0f1-7153.eun1.devtunnels.ms

we can do so from the following URL:

https://6j9dn0f1-7153-inspect.eun1.devtunnels.ms

If we are using persistent Dev Tunnels which don’t change URL across Visual Studio restarts we can bookmark the traffic inspection URL for our Dev Tunnel.

In the sample screenshot above we can see I’ve sent three successful requests to the Dev Tunnel isdevtunnel endpoint and one request to the Dev Tunnel root address which returned 404 as there is no endpoint configured for that address.

Monitoring traffic to a Dev Tunnel is invaluable, especially in complex scenarios involving multiple components. While breakpoints capture only a single request at a time, real-time traffic monitoring offers a comprehensive view of interactions across systems and helps us identify issues that might otherwise go unnoticed.

Note – Dev Tunnel URLs are not recycled when deleted, thus I didn’t obscure the URLs in the screenshot above.

Leave a Reply

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