-
Notifications
You must be signed in to change notification settings - Fork 21
Agent Debug Panel
New in VS Code 1.110: The Agent Debug panel provides real-time visibility into chat sessions, showing which customizations are loaded, tool calls, system prompts, and more.
The Agent Debug panel gives you deeper insight into how Accessibility Agents work within VS Code. It replaces the old Diagnostics action with a richer, more detailed view that helps you understand and troubleshoot your agent configuration.
The panel shows chat events as they happen:
- Chat customization events - When skills, prompts, hooks, agents are loaded
- System prompts - The actual prompts sent to the model
- Tool calls - Which tools agents invoke and their results
-
Hook execution - When
PreToolUse,PostToolUse, and other hooks fire - Session lifecycle - Session creation, context compaction, forking
See exactly which Accessibility Agents customizations are active:
- ✅ Loaded agents (accessibility-lead, aria-specialist, forms-specialist, etc.)
- ✅ Active skills (markdown-accessibility, cognitive-accessibility, web-severity-scoring, etc.)
- ✅ Applied workspace instructions (web-accessibility-baseline, semantic-html, aria-patterns)
- ✅ Hook execution order and timing
- ✅ Prompt files invoked
Visual hierarchy showing:
- Event sequence and timing
- Tool call dependencies
- Hook trigger chain
- Context compaction points
Method 1: Command Palette
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac) - Type "Developer: Open Agent Debug Panel"
- Press Enter
Method 2: Chat View
- Click the gear icon at the top of the Chat view
- Select "View Agent Logs"
When you start a chat session in a web project:
- Open the Agent Debug panel
- Look for
UserPromptSubmithook event - this should show the accessibility-lead delegation instruction firing - Check for loaded agents - you should see accessibility-lead and specialist agents like aria-specialist, forms-specialist, keyboard-navigator
- Verify workspace instructions are loaded - web-accessibility-baseline.instructions.md, semantic-html.instructions.md, aria-patterns.instructions.md
What to look for:
✅ Hook: UserPromptSubmit
→ Action: Inject accessibility-lead delegation
→ Status: Executed
✅ Agents loaded: 25
- accessibility-lead
- aria-specialist
- forms-specialist
- keyboard-navigator
- modal-specialist
- contrast-master
... (more)
✅ Instructions loaded: 3
- web-accessibility-baseline.instructions.md
- semantic-html.instructions.md
- aria-patterns.instructions.md
✅ Skills loaded: 17
- framework-accessibility
- cognitive-accessibility
- markdown-accessibility
- web-severity-scoring
... (more)
If you're unable to edit UI files, the debug panel shows why:
- Look for
PreToolUsehook events - Check if
permissionDecision: "deny"appears for Edit/Write operations on.jsx,.tsx,.vue,.css,.htmlfiles - Verify if the session marker exists (set by
PostToolUseafter accessibility-lead completes)
Troubleshooting edit gate issues:
⚠️ Hook: PreToolUse
→ Tool: editFile
→ File: src/components/Button.tsx
→ Decision: deny
→ Reason: accessibility-lead review not completed
✅ Next step: Invoke @accessibility-lead to unlock edit gate
The three-hook enforcement flow should appear as:
Hook 1: UserPromptSubmit (Proactive detection)
Event: UserPromptSubmit
Trigger: User sent message "fix the styling"
Action: Inject accessibility delegation instruction
Framework detected: React (package.json, *.jsx files)
Result: Delegation instruction added to prompt
Hook 2: PreToolUse (Edit gate)
Event: PreToolUse
Tool: editFile
Target: src/App.jsx
Session marker present: false
Decision: deny
Message: Please consult @accessibility-lead before editing UI files
Hook 3: PostToolUse (Session marker)
Event: PostToolUse
Agent: accessibility-lead
Action: Create session marker
Result: Edit gate unlocked for remainder of session
When accessibility-lead runs, you'll see tool invocations:
-
readFile- Reading component files for review -
grepSearch- Searching for ARIA patterns, keyboard handlers -
semanticSearch- Finding related accessibility code -
askQuestions- Interactive clarification from you -
screenshotPage- Visual verification (if browser tools enabled) -
evaluatePage- Running axe-core audits
During long audits, watch for:
Event: ContextCompaction
Trigger: Manual (/compact) or Automatic (context limit)
Before: 45,000 tokens
After: 12,000 tokens
Summary: Audit findings preserved, implementation details compacted
Symptoms in Debug Panel:
⚠️ Agents loaded: 0
⚠️ Instructions loaded: 0
Solutions:
- Verify
.github/agents/*.agent.mdfiles exist - Check
.github/copilot-instructions.mdexists - Reload VS Code window
- Check extension status: GitHub Copilot and GitHub Copilot Chat should be enabled
Symptoms in Debug Panel:
✅ Hook: UserPromptSubmit registered
⚠️ No execution events
Solutions:
- Verify hooks are enabled in settings (check for disabled hooks)
- Check workspace trust - hooks may be disabled in untrusted workspaces
- Update to latest VS Code and Copilot extensions
Symptoms in Debug Panel:
Event: PreToolUse
Decision: deny
File: src/utils/api.ts (backend logic, not UI)
Solution: The edit gate uses file extension patterns. If it's blocking non-UI files incorrectly, this is a false positive. Report it as an issue so we can refine the pattern matching.
Symptoms in Debug Panel:
✅ Skills directory exists: .github/skills/
⚠️ Skills loaded: 0
Solutions:
- Verify
.github/skills/**/SKILL.mdfiles have valid YAML frontmatter - Check
name:anddescription:fields are present - Ensure no syntax errors in SKILL.md files
- Reload window after adding new skills
The chart view shows event hierarchy. For a typical Accessibility Agents session:
Session Start
├─ UserPromptSubmit Hook
│ └─ Inject delegation instruction
├─ Load Customizations
│ ├─ 25 agents
│ ├─ 17 skills
│ └─ 3 workspace instructions
├─ Agent: accessibility-lead invoked
│ ├─ Tool: readFile (component)
│ ├─ Tool: grepSearch (aria patterns)
│ ├─ Tool: askQuestions (clarification)
│ └─ Response generated
├─ PostToolUse Hook
│ └─ Create session marker
└─ PreToolUse Hook (next edit)
└─ Decision: allow (marker present)
Use the debug panel to measure:
- Hook execution time - Should be < 100ms
- Agent initialization - How long it takes to load all 25+ agents
- Tool call latency - Time for readFile, grepSearch, etc.
- Context compaction time - How long summarization takes
Performance tips:
- Long hook execution (> 500ms) may indicate file I/O issues
- Slow agent loading suggests too many agents or large agent files
- High tool call latency points to slow file reads or searches
The Agent Debug panel is in preview as of VS Code 1.110. Share feedback:
- Local sessions only - Background and Claude agent sessions not yet supported
- No log persistence - Logs clear when VS Code restarts
- No export - Cannot save logs for sharing or offline analysis
Future releases may add these capabilities.
- Lifecycle Hooks Guide - Deep dive on the three-hook enforcement system
-
Context Management Guide - Using
/compacteffectively - Agent Customization - Creating custom agents and skills
- VS Code Agent Documentation
- Accessibility Lead
- Web Accessibility Wizard
- Document Accessibility Wizard
- Alt Text and Headings
- ARIA Specialist
- Contrast Master
- Forms Specialist
- Keyboard Navigator
- Link Checker
- Live Region Controller
- Modal Specialist
- Tables Data Specialist
- Word Accessibility
- Excel Accessibility
- PowerPoint Accessibility
- PDF Accessibility
- Office Scan Config
- PDF Scan Config
- Testing Coach
- WCAG Guide