A Chrome DevTools extension for debugging WebSocket data streams with Protocol Buffer message decoding capabilities.
- Real-time WebSocket message monitoring
- Protocol Buffer message decoding
- Binary data visualization
- Message history tracking
- Detailed message inspection
- Clone this repository:
git clone <your-repo-url>
cd websocket-proto-debugger- Install dependencies:
npm install- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension directory
- Make sure to select the root directory containing manifest.json
- Start the test WebSocket server:
cd test
node server.js-
Open the test page:
- Navigate to the
testdirectory and openindex.htmlin Chrome - Or serve it using a local HTTP server:
npx http-server . -p 3000 - Then visit
http://localhost:3000/test/index.html
- Navigate to the
-
Open Chrome DevTools and select the "WebSocket Proto" panel
- You should see incoming messages being decoded and displayed
- The test server sends a new message every 2 seconds
-
Ensure all required files are present:
manifest.json background.js devtools.html devtools.js panel.html panel.js styles.css -
Create a ZIP file containing these files:
- On macOS/Linux:
zip -r websocket-proto-debugger.zip . -x "*.git*" -x "node_modules/*" -x "test/*" -x "*.zip"
- On Windows:
- Right-click the files
- Select "Send to > Compressed (zipped) folder"
- Name it "websocket-proto-debugger.zip"
- On macOS/Linux:
To create a .crx file for distribution:
-
Pack the extension in Chrome:
- Go to
chrome://extensions/ - Ensure "Developer mode" is enabled
- Click "Pack extension"
- In "Extension root directory", select your extension's folder
- Leave "Private key file" empty for first-time packaging
- Click "Pack Extension"
- Go to
-
Chrome will generate two files:
websocket-proto-debugger.crx: The packaged extensionwebsocket-proto-debugger.pem: The private key file
-
Important notes:
- Keep the .pem file secure - you'll need it for future updates
- Don't include the .pem file in version control
- For future updates:
- Use the same .pem file in the "Private key file" field
- This ensures users can update smoothly
The extension is now ready for:
- Loading in Chrome via "Load unpacked" (using the unzipped directory)
- Direct installation via the .crx file
- Submission to the Chrome Web Store (using the ZIP file)
The extension uses the following technologies:
- Chrome Extension APIs
- WebSocket protocol
- Protocol Buffers
- Node.js (for test server)
├── background.js # Extension background script
├── devtools.html # DevTools page
├── devtools.js # DevTools script
├── manifest.json # Extension manifest
├── panel.html # Panel UI
├── panel.js # Panel functionality
├── styles.css # Panel styles
└── test/
├── index.html # Test page
├── messages.proto # Protocol Buffer definition
└── server.js # Test WebSocket server