Using the Pusher debug console and event creator

There is a debug console available for you to use for each of your apps. The debug console is great when you're testing something out when first getting setup with Pusher and you want to see what sort of messages are being generated or you want to make sure your messages are getting through to Pusher correctly. It's also pretty handy if, as the name suggests, you need to debug a problem in one of your apps.

There are a number of helpful features that the debug console has that will speed up your debugging. 

 

Filtering logs

You can filter which logs will be displayed in the debug console by using the search input. You can filter based on channel name, event name, log type (e.g. api message), data in the message payload, and even timestamp (e.g. 11:34:26). So, for example, you could use a search query of "api message my-channel 21:18:55" to see all of the API messages that were sent to Pusher for your app, to the channel called "my-channel", at 21:18:55.

 

Toggling log types

There are checkboxes that allow you to selectively subscribe to a certain subset of types of logs. This is especially useful if you’ve got a specific problem that you’re trying to debug and are only interested in one type of log. Note that if you uncheck the box for a given log type then your browser won't receive logs of that type until you check it back on (it's not just that the logs aren't being shown, they're actually not being received at all).

 

Throttling logging speed

If you or your browser is finding it hard to keep up with the rate at which logs are being added to the debug console then you can use the logging speed slider at the top of the debug console to slow down the rate at which they’re added to the table.

 

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. Note that you can’t currently trigger client events using the debug console though.

 

Replaying API messages

API messages have a little replay icon next to them which, when clicked, will re-send that message and update the event creator to contain the relevant information for that event so you can easily resend it again and again, if you want to.

 

Was this article helpful?
0 out of 0 found this helpful
Haven't found what you were looking for?
Submit a ticket