DEV Community

Brian Olore
Brian Olore

Posted on • Originally published at brian.olore.net on

Peeking at Slack with CDP

CDP, or Chrome DevTools Protocol, is pretty neat, check this out -

Warning: OSX paths, your OS may will vary

From the Terminal, start Slack with

/Applications/Slack.app/Contents/MacOS/Slack --remote-debugging-port=21212

From the Terminal, start Chrome with

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome http://localhost:21212 --remote-debugging-port 21212

Then click the link that shows the open channel and open DevTools, and switch to the Network tab.

Next, click on the network request that opens the websocket as shown here:

Find the 'websocket' request

Click on any of the Messages and see the contents!
Click to see the contents of any Message

Note: some are more interesting than others.

This is the first time I opened Slack from the command line, it is also interesting to read the logs as you take various actions within Slack. Iā€™m definitely curious about whatever ublockworkaround.history is!

Top comments (0)