How Do I Use The Channels 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

From the Filter dropdown, there are checkboxes that allow you to selectively subscribe to a certain subset of events. 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).

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.

Still have questions? Please reach out to our Support team by visiting this page.

Last updated