Playground
Test and experience various features of Chrome Remote DevTools in the playground.
Features
Open DevTools
Click the Open DevTools button to open Chrome DevTools in a popup window. This DevTools is connected to the current page, allowing you to monitor console messages, network requests, DOM structure, and more in real-time.
Test Console
Click the Test Console button to output various levels of console messages:
console.log()- General log messagesconsole.error()- Error messagesconsole.warn()- Warning messagesconsole.info()- Info messages
With DevTools open, clicking this button will show each message with different colors and icons in the Console panel.
Test Network
Click the Test Network button to send a network request to the GitHub API. With DevTools open, clicking this button will:
- Show HTTP requests and responses in the Network panel
- Display detailed request headers, response headers, and response bodies
- Show network timing information
Test LocalStorage
Click the Test LocalStorage button to store test data in localStorage. With DevTools open, clicking this button will:
- Show stored data in the Local Storage section of the Application panel
Export File
Click the Export File button to export all events that occurred on the current page to a JSON file.
How to Use
-
Collect Events: First, open DevTools and trigger various events on the page. The client script automatically stores console messages, network requests, SessionReplay events, etc.
-
Export File: Click the Export File button in the playground to automatically download a JSON file. Alternatively, you can call
ChromeRemoteDevTools.exportEvents()on the page. -
Save File: The downloaded file can be replayed later or shared with others.
Replay File
Click the Replay File button to select and replay previously exported event files (.json).
How to Use
-
Select File: Click the Replay File button in the playground and select the exported JSON file.
-
View Replay: Once the file is loaded, DevTools will automatically open in replay mode and all stored events will be replayed:
- Console messages appear in the Console panel
- Network requests appear in the Network panel
- SessionReplay events appear in the SessionReplay panel
- DOMStorage events appear in the Application panel
File Format
The exported JSON file has the following structure:
Replay Mode Features
- Offline Replay: Replay stored events without the original page or server
- Time Travel: Review and analyze past events
- Debugging: Accurately reproduce the state at the time of an issue
- Sharing: Share event files with team members to reproduce the same situation
Getting Started
Server Setup
First, install and start the server:
Install the server package:
Start the server (default port: 8080):
For production with SSL:
Client Integration
Install the client package and initialize it in your application:
React / TypeScript:
Vanilla JavaScript (IIFE):
Configuration Options
serverUrl: WebSocket server URL (usewss://for HTTPS,ws://for HTTP)rrweb.enable: Enable session replay recording (optional, default:false)rrweb.enableExportButton: Show export button in the page (optional, default:false)skipWebSocket: Skip WebSocket connection and use postMessage only (optional, default:false)
Inspector Access
Once the client script is loaded, you can connect using the Inspector:
- Web Inspector: Open
https://your-server.com/inspectorin your browser - Desktop Inspector: Download and run the desktop application
The Inspector will automatically detect connected clients and allow you to debug them.
Example Code
Output Console Messages
Send Network Request
Use LocalStorage
Export Events
Notes
- Make sure the page is fully loaded before opening DevTools
- Network testing requires an internet connection as it sends actual network requests
- Replaying large event files may take some time