Enable SignalR Logging with One Simple Line

It is easy to think that SignalR works within a black box, but if you are deploying JavaScript clients, here is an EASY trick to learning what is happening underneath the scenes.

Before you start your connection, add this ONE line of code:

1
2
$.connection.hub.logging = true;
$.connection.hub.start();

Tada! You have logging in your browser console:

Originally published on 2015-08-28 in Development - ASP.NET

Enjoy this article? Let's keep in touch

I really appreciate you taking the time out of your schedule to read this post. I like to keep my friends updated on new articles and also spawn discussions here and there.

If you'd like to keep in touch, please subscribe below. And I promise, no more than 1 email per week (if even that).