2

I am working on various asp.net/.net core web projects that exchange data with different production APIs, some of them being rather complex. These APIs are not under my control and they communicate only using HTTPS. For debugging, I would like to see the complete requests and responses that my projects exchange with the APIs.

Obviously in VS 2017 there used to be a network debugging option which does not seem to be available in VS 2019. I tried to use the "Events viewer" debugging tool, attached it to the devenv process but when starting VS presents me an error message "The collection session cannot be launched because another one is currently active" so I guess this is the Diagnostic Tool which usually is running when debugging. There is no "Network" option available even though it claims to show HTTP requests.

Generally, when debugging HTTPS traffic I am using Wireshark with the browser's pre-mastered keys (similar to what is described here). However, this communication is not initiated by a browser but rather by my C# code running on Visual Studio's local IIS instance, so I wonder if there is another option to maybe get the encryption keys from VS to be exported so they can be used with Wireshark?

Any other suggestions are welcome. Switching to HTTP unfortunately is not an option here for reasons mentioned above.

Aileron79
  • 523
  • 5
  • 27
  • 1
    You can use a proxy tool like BurpSuite to capture and forward the traffic. – Duston Aug 06 '20 at 13:05
  • @Duston: Thanks for the suggestion, I like the idea and might give it a try, however, I'd like to have a closer look at all layers, and also there are some timing issues I would like to investigate, I am afraid of distorting the results. – Aileron79 Aug 06 '20 at 13:43
  • Did you ever find something? I'm trying to debug some HTTP requests in VS Pro 2019, and would love something like the Dev Tools network tab in modern browsers. – vitale232 Feb 05 '21 at 11:20
  • 1
    @vitale232, if it is HTTP requests, I would highly recommend to use Wireshark. Unfortunately, debugging capabilities are very limited when it comes to HTTPS as you cannot read the encrypted traffic. However, it still helped to figure out that the problem I had was related to TCP keepalive packets not being sent - these will show up even when debugging an HTTPS connection. – Aileron79 Feb 11 '21 at 07:22
  • I'm in a very similar situation, debugging against an online provider's production services which use HTTPS. I'm quite surprised this doesn't "just work" in VS 2019, but I guess it's a harder problem than it appears on the surface. Fwiw, I've been able to mold my requests in Postman and carry them over, but it's slow going. – vitale232 Feb 12 '21 at 12:24

0 Answers0