DevTools
Debug with the DevTools panel
DevTools provides real-time debugging for your bot. Inspect events, view session state, make REST API calls, and analyze performance.
Opening DevTools
Press Ctrl+Shift+D (or Cmd+Shift+D on Mac) in Stage UI to toggle the DevTools panel.
The panel appears docked at the bottom of the screen with 8 tabs for different debugging perspectives. You can resize the panel by dragging the top edge and double-click the header to maximize.
DevTools panel open at the bottom of Stage UI showing the Events tab with a chronological list of stage events including message_create, interaction_create, and typing_start entries, with a detail pane on the right showing JSON data for a selected event
Events Tab
View all Stage events in real-time with a split-pane layout:
- Event List (left) - Chronological event stream with sequence numbers, type badges, and preview text
- Event Details (right) - Click any event to see its full JSON payload in an expandable viewer
- Type Filter - Dropdown to filter by event type
- Search - Find events by content, type, or payload data
Event Types
Events are filtered by the Stage event system. Common types include:
| Event | Description |
|---|---|
state_sync | Initial state synchronization |
message_create | New message in channel |
message_update | Message edited |
message_delete | Message removed |
interaction_create | Slash command, button, etc. |
interaction_response | Bot response to interaction |
typing_start | User started typing |
message_reaction_add | Reaction added |
message_reaction_remove | Reaction removed |
connected | Connection established |
heartbeat | WebSocket heartbeat |
activity.launched | Activity started in session |
activity.closed | Activity stopped |
activity.rpc.outbound | RPC message sent to activity |
What to look for: If your bot doesn't respond, check that the expected event arrives (e.g., interaction_create). If it does arrive but there is no interaction_response, the issue is in your command handler. Use the type filter to isolate relevant events.
State Tab
Explore the current session state tree with a summary bar showing entity counts at a glance:
The summary bar shows counts for Guilds, Channels, Members, Roles, Messages, and Commands.
Below the summary, an expandable JSON tree viewer shows the full session state:
session
├── connection
│ ├── sessionId
│ ├── isConnected
│ ├── isConnecting
│ └── error
├── ui
│ ├── selectedGuildId
│ ├── selectedChannelId
│ └── showMembers
├── botUser: { id, username, avatar, ... }
├── stats
│ ├── eventCount
│ ├── lastHeartbeat
│ ├── guildsCount, channelsCount, ...
│ └── commandsCount
├── guilds: [...]
├── channels: [...]
├── members: [...]
├── roles: [...]
├── users: [...]
├── commands: [...]
├── messages: { [channelId]: [...] }
└── typingUsers: { [channelId]: [...] }DevTools State tab showing the summary bar at the top with entity counts (Guilds: 1, Channels: 6, Members: 5, etc.) and below it an expandable JSON tree viewer with the session state tree expanded to show guilds, channels, and members data
What to look for: Verify guild setup is correct, check that messages are stored in the right channels, and inspect user/member data. If the summary bar shows unexpected counts (e.g., 0 channels), your session config may be wrong.
Network Tab
The Network tab has two sub-tabs:
Client
A built-in REST client for making API requests directly:
- Method Selector - Choose GET, POST, PUT, PATCH, or DELETE
- Path Input - Enter the endpoint path with autocomplete suggestions from registered routes
- Request Body - JSON editor for non-GET requests
- Response Viewer - Shows status code, duration, and response body as expandable JSON
Log
Monitor REST API calls made by the bot:
- Request List - Each entry shows method, path, status code, and duration
- Detail View - Click a request to see full details including request body, response body, endpoint name, and timestamp
- Filtering - Filter by path or method
DevTools Network tab showing the REST client with method selector, path input, and response viewer on the Client sub-tab, and request log entries on the Log sub-tab
Performance Tab
Track event throughput and response times:
Metrics
| Metric | Description |
|---|---|
| Total Events | Total number of recorded events |
| Interactions | Number of interaction events |
| Responses | Number of interaction responses |
| Messages | Number of message events |
| Avg Response | Average time between interaction and response |
| Events/min | Event throughput rate |
Event Type Breakdown
A bar chart showing the distribution of event types, sorted by frequency. This helps identify which events dominate the session.
DevTools Performance tab showing a metrics table with Total Events, Interactions, Responses, Messages, Avg Response time, and Events/min, alongside an event type bar chart breakdown
What to look for: A high Avg Response time may indicate slow command handlers. If Events/min is unexpectedly high, your bot may be triggering loops. Check the event type breakdown to see if one type dominates.
Tools Tab
Testing utilities and simulation controls:
Test Data
Generate sample messages, users, channels, and other entities for testing the Stage UI. Clicking "Generate Test Data" populates the current session with realistic test content including messages with embeds, attachments, reactions, and interactive components.
Loop Protection
Toggle the loop detection system that prevents infinite loops when bots respond to their own MESSAGE_CREATE events:
- Status - Enable or disable loop protection
- When disabled, the server will not prevent infinite loops
Rate Limit Simulation
Simulate Discord API rate limits to test bot retry logic:
- Status - Enable or disable rate limiting
- Retry After - Configurable delay in seconds (1-60)
- Mode - One-shot (auto-disables after first 429) or Persistent (keeps returning 429)
- Scope - Target specific endpoint groups: All, Messages, Interactions, Guilds, or Channels
Message States
Test visual states in the message area:
- Show "Bot is thinking..." - Simulates a deferred interaction response indicator
- Show Failed Message - Displays a failed message with error details
Voice States
Test voice channel member display:
- Add User to Voice - Add a test user to a voice channel
- Add Multiple Users - Add several users with varying mute/deaf states
- Remove User from Voice - Remove a user from voice
- Simulate Speaking - Show the speaking indicator for a user
Components V2
Test Discord Components V2 message format with various component types:
- TextDisplay + Separator
- Section + Thumbnail
- Section + Button
- MediaGallery
- Container + Buttons
- File + Spoiler
- Spoiler Container
DevTools Tools tab showing the test data generator button, loop protection toggle, rate limit simulation controls with mode and scope selectors, message state buttons, and Components V2 test options
Permissions Tab
Test and debug the permission enforcement system:
Enforcement Level
Control how strictly permissions are checked for API requests:
- None - All requests allowed regardless of permissions
- Basic - Simple permission checks
- Strict - Full Discord-style permission enforcement
Quick Actions
- Grant Admin - Grant Administrator to all users
- Deny All - Deny common permissions (SendMessages, ManageMessages, ManageChannels)
- Reset - Clear all permission overrides
Permission Overrides
View and manage active permission overrides. Each override shows the target user (or "All Users" for wildcard), the permissions being granted or denied, and an optional reason.
Permission Denied Log
View recent permission check failures with timestamp, HTTP method, path, and the missing permissions that caused the denial.
Testing permissions: Set enforcement to "basic" or "strict", use Quick Actions to grant or deny, then trigger bot operations and check the Permission Denied Log to see what was blocked and why.
DevTools Permissions tab showing enforcement level selector set to strict, quick action buttons for Grant Admin, Deny All, and Reset, a list of active permission overrides, and a denied log with recent permission check failures
Emojis Tab
Manage custom guild emojis:
Guild Selector
Select which guild to manage emojis for using the dropdown.
Emoji Grid
View all custom emojis in the selected guild. Each emoji shows its name and can be deleted.
Create Emoji
Upload a new custom emoji:
- Name - Alphanumeric with underscores, 2-32 characters
- Image - PNG, GIF, or JPEG, max 256KB
- Preview the image before creating
Tests Tab
View test results when running robo mock test:
Split Pane Layout
- File List (left) - Shows all test files with pass/fail status icons and counts
- Detail View (right) - Click a file to see its tests
Test Details
For each test file, the detail view shows:
- Overall status badge (running, passed, failed)
- File path and duration
- Session ID (click to copy)
- View Logs button - Opens the Logs panel filtered to this test session
- Replay button - Loads the test recording into playback mode
Assertion Results
Each test case shows:
- Name and duration
- Pass/fail status
- Error message and stack trace (if failed)
- Expandable assertions with expected vs actual values and diffs
DevTools Tests tab with a split pane layout: file list on the left showing test files with pass/fail icons, and assertion results on the right showing individual test cases with pass/fail diffs, duration, and a Replay button
Activity Tab
When an activity is running, the Activity tab shows real-time RPC communication between Stage UI and the Activity iframe.
RPC Message Log
A chronological list of all inbound and outbound RPC messages:
- Direction indicators -- Inbound messages (from activity) show a left arrow, outbound messages (to activity) show a right arrow
- Command name -- The RPC command (e.g.,
AUTHORIZE,GET_USER,SUBSCRIBE) - Nonce -- Request/response correlation ID
- Expandable payload -- Click any message to see its full JSON payload
- Filter -- Filter messages by command name or direction
READY Payload
View the full READY event payload that was sent to the activity on launch. This includes the mock user, guild, channel, and configuration data.
Active Subscriptions
Lists all events the activity has subscribed to via the SUBSCRIBE command, with their subscription keys and arguments.
DevTools Activity tab showing the RPC message log with inbound and outbound messages, direction arrows, command names, and an expanded JSON payload for a selected message
Activity Controls
The Tools tab includes activity-specific controls when an activity is running:
Auth Settings
- Mode -- Switch between
auto_approve,auto_deny, andmanualauthentication modes - Default Scopes -- Configure which OAuth2 scopes are pre-selected
- Reset Auth -- Clear the current auth state to re-test the authorization flow
Platform State
- Layout Mode -- Switch between
focused,pip, andgridmodes to triggerACTIVITY_LAYOUT_MODE_UPDATEevents - Orientation -- Set orientation to trigger
ORIENTATION_UPDATEevents - Thermal State -- Set thermal state (
nominal,fair,serious,critical) to triggerTHERMAL_STATE_UPDATEevents
IAP Controls
- SKU Editor -- Add, edit, or remove mock SKUs (products) for in-app purchase testing
- Entitlement Editor -- Manage mock entitlements (purchased items) for the current user
URL Mappings
Edit URL mapping rules that control how the Activity Proxy routes requests. Format: prefix → target URL. Changes take effect immediately.
Toggle Controls
- CSP Mode -- Switch between
relaxed(allow everything) anddiscord_strict(production-like restrictions) - SDK Shim -- Enable or disable the SDK origin shim that patches
postMessageorigins - Origin Mode -- Switch between
strict(validate message origins) andlenient(allow mismatches)
Manual Event Emission
Send any SDK event to the activity manually. Select an event type, configure the payload, and emit it directly. Useful for testing edge cases and event handlers.
DevTools Tools tab showing activity-specific controls including auth mode selector, platform state controls for layout mode and orientation, IAP SKU editor, URL mappings editor, and toggle switches for CSP mode and SDK shim
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + Shift + D | Toggle DevTools |
Ctrl/Cmd + Shift + L | Toggle Logs panel |
Escape | Close DevTools |
Logs Panel
The Logs panel is a separate overlay from DevTools, accessed via Ctrl+Shift+L. It shows:
- Bot console output
- Logger messages
- ANSI color rendering
- Log level filtering
Log Levels
Filter by severity:
- Debug - Verbose debugging info
- Info - General information
- Warn - Warnings
- Error - Errors
Logs panel overlay showing colored console output with ANSI-rendered log messages, level filter buttons for Debug, Info, Warn, and Error, a search bar, and a density graph showing log activity over time
