Debugging Pusher

We offer a number of really useful features that can help you during development and whilst trying to get to the bottom of problems with your application.

Viewing application events in the Pusher Debug Console

The Pusher Debug Console can be found within the Pusher dashboard and can be used to help you understand what’s happening within your Pusher application.

It will initially indicate if you can connect or not - if you can connect you might briefly see a connection warning dialog. If you can’t connect the connection warning dialog will stay visible.

Once you have connected you can check that connections are being opened and closed, subscriptions are being made, channels are becoming occupied and vacated and that messages are being received by our API for your application. This feature can be really handy during development or when trying to troubleshoot why certain features in your application might not be working.

Sending test events using the Event Creator

The Event Creator is a really handy tool that lets you trigger an event on any channel with any event data directly from your Pusher app dashboard. This feature means you can write your client code to subscribe to a channel and consume an event without the need to write any server code to start off with. Or it can simply be used for checking that your client application is behaving as expected.

Enable logging in the Pusher JavaScript library

To make Pusher a bit more chatty about what is coming in via the socket connection, you can turn on debugging before you initialise your Pusher object. The most common use of this feature is to output all the logging from the Pusher library to the browser console as follows:

Pusher.log = function(message) { if (window.console && window.console.log) { window.console.log(message); } };

This should create output like the following in your browser (Chrome in this example):

Automated Diagnostics

We have a Pusher Diagnostics application that runs a number of tests related to the runtime environment (the browser) and the features offered by the Pusher JavaScript library. If you still can’t get to the bottom of a problem running the diagnostics and then getting in touch with support is a good next step.

Where next?

If all else fails then please give us a shout, and we’ll check whether there is a problem we can help you with.

Have you tried using the search to find what you’re after? If you still have a question then get in touch with us and let us help you out.