Skip to content

Test: Chat Debug Panel, export/import #301251

@vijayupadya

Description

@vijayupadya

Refs: #301245

  • macOS
  • anyOS

Complexity: 3

Create Issue


Context

VS Code includes an Agent Debug Panel — a built-in diagnostic tool for inspecting what happens behind the scenes during a Copilot chat session. It can be opened via the chat config menu ("Show Agent Logs").

Image

The panel provides:

  • Session overview — summary metrics (model turns, tool calls, token usage, errors, total events)
  • Log view — a chronological list of all debug events (tool calls, model turns, discovery events, errors) with filtering and search
  • Flow chart — a visual graph of the agent's execution flow showing how model turns, tool calls, and subagents relate to each other
  • Export/Import — sessions can be exported to OTLP JSON files for offline sharing/analysis, and previously exported files can be imported back for viewing

Debug Panel - Basic

  • Create a chat session and send few messages in chat
  • Open panel via Show Agent Logs --> panel opens with home view showing session list
  • Navigate to session --> Click a session → overview shows session details, metrics (Model Turns, Tool Calls, Tokens, Errors, Total Events)
  • View logs — Click "View Logs" → log list shows events with timestamps, names, details, try 'Tree view' as well.
  • View flowchart — Click "Agent Flow Chart" → flowchart renders with nodes for model turns, tool calls, subagents
  • Send a message and verify events appear — verify new events, model turn, tool calls etc appear
  • Invoke subagent (e.g. prompt : using subagent count .json files) and verify new subagent related events show up
  • Bonus: Do exploratory testing, use it on your real world session, see if its helpful to analyze your session.

Export

Image
  • Export a live session — Navigate to a session in debug panel → click Export icon (at top right corner) → save to disk → verify file is valid JSON with resourceSpans structure
  • Export with no session selected — Click Export without navigating to a session → shows info notification "No active debug session to export"

Import

  • Import a valid file — Click Import icon (at top right corner)→ select a previously exported JSON file → overview opens with correct session title, metrics
  • Import file > 50MB — Click Import → select a file larger than 50MB → modal warning dialog shows with actual file size in MB
    (To generate a large file, point agent to a small valid json file that you exported in previos step and ask it to generate a large 60MB file)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions