118

I installed Visual Studio Update 1 yesterday and now when running ASP.NET services locally on IIS (not the express version). I am seeing hundreds of requests per second to the address

 http://localhost:49155/vshub/ca9dea4b016f45c68a6a8c1a07809eb4/DataWarehouseModule/dataWarehouse/getStatus/ 

What is causing this and is it preventable?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Fishcake
  • 10,496
  • 7
  • 44
  • 72
  • 30
    VSHub is the component that shows live cpu and memory usage when you debug. You don't *have* to use it, turn it off with Tools > Options > Debugging > General > untick "Enable Diagnostic Tools while debugging". Or just don't get annoyed by those nice debugging features. – Hans Passant Dec 04 '15 at 11:55
  • 5
    Well it is annoying when you are using fiddler... thanks to KyleUp for a good solution – Poku Jan 29 '16 at 10:43
  • Possible duplicate of [visual studio 2015 vshub is spamming fiddler](http://stackoverflow.com/questions/33837163/visual-studio-2015-vshub-is-spamming-fiddler) – Michael Freidgeim Jul 26 '16 at 07:46

5 Answers5

109

Another option for preventing fiddler from chewing up your CPU is write a rule in fiddler to ignore those requests. Goto Rules > Customize Rules... find the function OnBeforeRequest and add

if(oSession.oRequest.headers["host"]=="localhost:49155"){
    oSession["ui-hide"] = "true";
}

so mine looks like this:

static function OnBeforeRequest(oSession: Session) {
    if(oSession.oRequest.headers["host"]=="localhost:49155"){
        oSession["ui-hide"] = "true";
    }
}

as @matrixugly pointed out the port can be different depending on the version of VS. @tedd-hansen's solution might be better across all versions of visual studio.

if(oSession.oRequest.headers["host"].StartsWith("localhost") 
    && oSession.PathAndQuery.StartsWith("/vshub/")) {
    oSession["ui-hide"] = "true";
}

Here's some discussion about this issue on github to get a better understanding of what's going on; https://github.com/aspnet/Mvc/issues/3655

Here's another post on SO for the same issue; visual studio 2015 vshub is spamming fiddler

Community
  • 1
  • 1
KyleUp
  • 1,683
  • 1
  • 13
  • 17
  • 2
    I just upgraded to VS2015 Update 2 this morning, and my vshub requests have "localhost:49160". Not sure if VS uses a different port for each version. Could probably update the condition to see if "host" starts with localhost, and url starts with /vshub/ – C. Tewalt Apr 04 '16 at 18:23
51

This is the debugger sending information back to VSHub process. It's internal communication between the two processes so that part of the debugger data collection can happen out-of-process.

It helps with debugger tooltips, performance information, the historical debugging experience and more. As such there's no way to turn it off without seriously crippling the advanced debugger features.

You can turn some of these features off (though other features may still rely on Vshub to do out-of-process work in the background):

Tools > Options > Debugging > General > [  ] Enable Diagnostic Tools while debugging

The communication is purely local and doesn't pose a serious overhead or issue. Is there a specific reason you want to get rid of it? Tools like Fiddler can be configured to filter on process, so ignoring this traffic should be simple.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 2
    I don't want to get rid of any new debugging features. I simply was seeing abnormally high CPU resources being used (since installing update 1 yesterday) on both Fiddler and VS and noticed these entries appearing in Fiddler. I have yet to investigate any of the new debugging features of Update 1 but will leave them on if beneficial to me. Cheers. – Fishcake Dec 04 '15 at 13:44
  • 2
    I have to agree with @Fishcake that these are disturbing, having to filter out debugger calls to see my own httpclient calls is a pain. That being said, good idea to filter. I had no idea what these were. – hal9000 Dec 15 '15 at 16:39
18

Since this has turned into ways to make Fiddler ignore the requests, the easiest way I've found is to go to the Filters tab, Request Headers section, check the "Hide if URL contains" box and enter "/vshub/".

Hiding with Filters

Brian Reischl
  • 7,216
  • 2
  • 35
  • 46
7

I realize this is not the answer, but it may help others that come here (like me).

Expanding on the answer KyleUp gave. Adding this to the "OnBeforeRequest" method is a bit more general and stops all localhost /vshub/ debug messages from filling up the view in Fiddler.

if(oSession.oRequest.headers["host"].StartsWith("localhost") 
   && oSession.PathAndQuery.StartsWith("/vshub/")) {
    oSession["ui-hide"] = "true";
}
Tedd Hansen
  • 12,074
  • 14
  • 61
  • 97
3

This is an easier alternative to hide the vshub localhost traffic.

Go to Tools > Fiddler Options > Connections tab and add http://localhost:49155 to the bypass list. This will skip all traffic posted to that Url.

mikro
  • 505
  • 1
  • 6
  • 12