LogoRobo.js

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

FocusThe DevTools panel docked at the bottom, showing the tab bar with Events/State/Network/Performance/Tools/Permissions/Tests/Emojis tabs, and the Events tab active with a split view of event list and detail paneZoom100%NotesShow a realistic session with several events in the list. The Events tab should be active. Include the resize handle at the top and the close/maximize buttons in the header.

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:

EventDescription
state_syncInitial state synchronization
message_createNew message in channel
message_updateMessage edited
message_deleteMessage removed
interaction_createSlash command, button, etc.
interaction_responseBot response to interaction
typing_startUser started typing
message_reaction_addReaction added
message_reaction_removeReaction removed
connectedConnection established
heartbeatWebSocket heartbeat
activity.launchedActivity started in session
activity.closedActivity stopped
activity.rpc.outboundRPC 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

FocusThe State tab with the summary bar of counts and the collapsible JSON tree viewer showing nested session dataZoom100%NotesShow the summary bar with realistic counts and the tree expanded one or two levels deep. The tree should show the root 'session' node with children like connection, ui, botUser, guilds, etc.

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

FocusThe Network tab with its two sub-tabs: Client for making requests and Log for monitoring API callsZoom100%NotesShow the Client sub-tab with a GET request completed and the response JSON visible. Alternatively show the Log sub-tab with several request entries showing method badges, paths, status codes, and durations.

Performance Tab

Track event throughput and response times:

Metrics

MetricDescription
Total EventsTotal number of recorded events
InteractionsNumber of interaction events
ResponsesNumber of interaction responses
MessagesNumber of message events
Avg ResponseAverage time between interaction and response
Events/minEvent 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

FocusThe Performance tab metrics table and event type distribution bar chartZoom100%NotesShow the metrics table with realistic values and the bar chart with several event types sorted by frequency. The bar chart should show interaction_create, message_create, etc.

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

FocusThe Tools tab with its various testing utilities and simulation controlsZoom100%NotesShow the Tools tab with all sections visible: Test Data generator, Loop Protection toggle, Rate Limit Simulation with status/retry/mode/scope controls, Message States buttons, Voice States controls, and Components V2 section.

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

FocusThe Permissions tab with enforcement level, quick actions, permission overrides list, and denied logZoom100%NotesShow the enforcement level dropdown set to 'strict', the three quick action buttons, at least one active permission override entry, and several entries in the denied log showing timestamp, method, path, and missing permissions.

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

FocusThe Tests tab split pane with file list and detailed assertion results including expected vs actual diffsZoom100%NotesShow the file list with a mix of passed and failed test files. On the right, show a selected file's test details with status badges, durations, and at least one expanded assertion showing expected vs actual values with a diff.

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

FocusThe Activity tab RPC log with message direction indicators and expandable payloadsZoom100%NotesShow the Activity tab with several RPC messages listed chronologically. Include both inbound (from activity) and outbound (to activity) messages with direction arrows. One message should be expanded showing its JSON payload. Show the READY Payload and Active Subscriptions sections below.

Activity Controls

The Tools tab includes activity-specific controls when an activity is running:

Auth Settings

  • Mode -- Switch between auto_approve, auto_deny, and manual authentication 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, and grid modes to trigger ACTIVITY_LAYOUT_MODE_UPDATE events
  • Orientation -- Set orientation to trigger ORIENTATION_UPDATE events
  • Thermal State -- Set thermal state (nominal, fair, serious, critical) to trigger THERMAL_STATE_UPDATE events

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) and discord_strict (production-like restrictions)
  • SDK Shim -- Enable or disable the SDK origin shim that patches postMessage origins
  • Origin Mode -- Switch between strict (validate message origins) and lenient (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

FocusThe activity controls section in the Tools tab with auth, platform, IAP, URL mapping, and toggle controlsZoom100%NotesShow the Tools tab scrolled to the activity controls section. Include the auth mode dropdown, platform state controls, IAP SKU list with add/edit buttons, URL mappings table, and toggle switches for CSP mode, SDK shim, and origin mode.

Keyboard Shortcuts

ShortcutAction
Ctrl/Cmd + Shift + DToggle DevTools
Ctrl/Cmd + Shift + LToggle Logs panel
EscapeClose 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

FocusThe Logs panel overlay with colored log output, level filters, and search functionalityZoom100%NotesShow the Logs panel as a separate overlay from DevTools with several log messages in different colors (green for info, yellow for warn, red for error). Include the level filter buttons and search bar at the top.

Next Steps

On this page