Skip to content

mirekholec/copilot-debugger

Repository files navigation

Copilot Debugger

See exactly how many tokens — and how much money — each VS Code Copilot Chat session burns. 100% local, zero telemetry.

Copilot Debugger reads your local Copilot Chat logs and shows session metadata, turns, models, tools, agents, token usage, and estimated AI costs in a compact web UI. Nothing leaves your machine.

npm version npm downloads node license

npx copilot-debugger

Contents

Why

Copilot Chat is a black box. You don't see what's actually happening inside a session until it's slow, expensive, or both. Copilot Debugger opens that box:

  • A session feels slow or bloated — see which turns, tools, and agents ate the context window.
  • You're moving to usage-based billing (AI Credits) — check real token usage and estimated cost before it hits your invoice.
  • You want to understand model behavior — inspect which models ran, what tools they called, and how much each turn cost.

Everything runs on your machine. No account, no cloud, no data leaving your laptop.

What It Is

Copilot Debugger reads local VS Code Copilot Chat transcript and debug JSONL files and shows them in a compact web UI.

It scans local VS Code storage, normalizes sessions, and displays session metadata, turns, models, tools, agents, token usage, and estimated AI usage costs.

Privacy: The app does not send your data anywhere. It reads files from your machine and serves the UI locally. It does not call GitHub, Microsoft, Copilot, or any external analytics API.

Default data sources:

  • GitHub.copilot-chat/transcripts/*.jsonl
  • GitHub.copilot-chat/debug-logs/*/*.jsonl

Installation

Requirements:

  • Node.js 20.9 or newer
  • VS Code with local Copilot Chat session logs

Run the published package:

npx copilot-debugger

Local development:

npm install
npm run dev

Default local URLs:

  • Web UI: http://127.0.0.1:5173
  • API: http://127.0.0.1:4317

Useful commands:

npm run typecheck
npm run build
npm run start

Optional environment variables:

  • PORT - backend port
  • VSCODE_WORKSPACE_STORAGE_ROOT - custom VS Code workspaceStorage root
  • VSCODE_COPILOT_SESSION_ROOT - direct root for test/session data
  • SESSION_POLL_INTERVAL_MS - fallback refresh interval

Example:

VSCODE_WORKSPACE_STORAGE_ROOT="/path/to/workspaceStorage" npm run dev

Changelog

Release notes are maintained in CHANGELOG.md.

Troubleshooting

  • No sessions are shown: check that VS Code has Copilot Chat logs under workspaceStorage.
  • Wrong storage location: set VSCODE_WORKSPACE_STORAGE_ROOT explicitly.
  • Port is already used: set PORT, for example PORT=4321 npm run dev.
  • Broken or incomplete data: Copilot Chat log formats are not a stable public API and may change between VS Code versions.
  • TypeScript errors after changes: run npm run typecheck before debugging runtime behavior.

Screenshots

Session list Session detail
Session list Session detail
Model usage
Model usage

Architecture

Main stack:

  • React + Vite frontend in src/
  • Node.js + Express backend in server/
  • REST API under /api/*

Author

Contribute

Issues and pull requests are welcome. Keep changes small, focused, and tested with npm run typecheck.

License

MIT. See LICENSE.

About

Local viewer for VS Code GitHub Copilot Chat sessions. Reads transcript & debug JSONL files locally and shows session metadata, turns, models, tools, agents, token usage and estimated AI costs. No data leaves your machine.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages