Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Culprit SQLNew to Visual Studio Code? Get it now.
Culprit SQL

Culprit SQL

Culprit SQL

|
2 installs
| (0) | Free
Interactive SQL execution plan diagrams, side-by-side plan diffs, deadlock cycle graphs, and SQL migration safety checks powered locally by WebAssembly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Culprit SQL Execution Plan, Plan Diff, and Deadlock Studio inside VS Code and Cursor

VS Code Marketplace Open VSX Wasm Parser Plan Viewer License: MIT

Interactive SQL execution plan diagrams, structural Before vs After plan diffs, deadlock cycle graphs, and SQL migration safety checks for VS Code, Cursor, and Windsurf.
Running 100% locally in WebAssembly via @culpritsql/plans and @culpritsql/plan-viewer.

Try Online at explain.culpritsql.com · Features · Shortcuts · Engines · Security


Feature Highlights

  • Zero-Click Custom Editor: Double-click any *.sqlplan, *.explain.json, *.plan.json, or *.xdl file in Explorer to open an interactive operator flow diagram or deadlock wait graph. Live edits stream directly into the viewer.
  • Interactive Plan & Deadlock Studio (Cmd+Shift+E / Ctrl+Shift+E): Paste EXPLAIN (ANALYZE, BUFFERS) output, Showplan XML, MySQL EXPLAIN ANALYZE, or server deadlock logs without creating scratch files.
  • Side-by-Side Structural Plan Diff: Select two plan files in Explorer and click Culprit: Compare Two Execution Plans to inspect measured speedup, cost ratio, Seq Scan to Index Scan access flips, and operator property changes with synchronized pan and zoom.
  • Inline CodeLens & SQL Migration Safety Diagnostics:
    • Adds ⚡ Culprit: Paste EXPLAIN · ⇄ Compare Plan lenses above queries in .sql files and sql\...`` / Prisma.$queryRaw\...`` template literals in TypeScript and JavaScript.
    • Flags risky SQL constructs before production deploy: UPDATE / DELETE without WHERE, CREATE INDEX without CONCURRENTLY on existing tables, CREATE INDEX CONCURRENTLY inside BEGIN ... COMMIT, non-sargable WHERE LOWER(col) = ... predicates, and leading-wildcard LIKE '%...' filters.
  • Redacted Share Links & Standalone Exports: Export single-file HTML or Markdown reports, or generate compressed explain.culpritsql.com/#s=z1... URLs with SQL string and numeric literals scrubbed automatically.
  • Native Theme Sync: Follows VS Code, Cursor, and Windsurf Dark, Light, and High Contrast themes automatically.

Screenshots

Custom Execution Plan & Deadlock Viewer

Double-click any .sqlplan, .explain.json, .plan.json, or .xdl file to inspect interactive operator graphs, bottleneck fixes, and lock wait cycles with one-click redacted exports:

Culprit SQL custom deadlock graph viewer inside VS Code

Inline SQL Safety Diagnostics & CodeLens

Catch blocking CREATE INDEX, CREATE INDEX CONCURRENTLY inside transactions, unbounded UPDATE/DELETE, non-sargable LOWER(col) filters, and leading-wildcard LIKE '%...' scans directly in .sql migrations and TypeScript sql\...`` / Prisma.$queryRaw\...`` queries:

Culprit SQL inline migration warnings, CodeLens, hover tooltip, and Problems panel in VS Code


Interactive Demo Workspace

Open the included demo/ folder directly in VS Code, Cursor, or Windsurf to test custom plan/deadlock editors, Before vs After plan comparison, inline SQL CodeLens, and migration safety diagnostics immediately:

git clone https://github.com/culpritsql/culprit-vscode.git
code culprit-vscode/demo

Commands & Keyboard Shortcuts

Command Shortcut Description
Culprit: Open SQL Plan & Deadlock Studio Cmd+Shift+E (Ctrl+Shift+E) Opens the interactive Plan, Compare, and Deadlock Studio panel
Culprit: Explain Plan or Deadlock from Clipboard Command Palette / Context Menu Parses and renders EXPLAIN or deadlock output directly from your clipboard
Culprit: Explain Selected Plan / Deadlock Editor Selection Context Menu Visualizes the highlighted execution plan, deadlock log, or SQL query
Culprit: Compare Two Execution Plans Explorer Context Menu (2 files) Opens structural Before vs After comparison for selected plan files
Culprit: Open Redacted Link on explain.culpritsql.com Command Palette Scrubs SQL literals, compresses with deflate-raw, and opens in browser

Supported Engines & Formats

Engine Execution Plan Formats Deadlock Formats
PostgreSQL & TimescaleDB EXPLAIN (ANALYZE, BUFFERS, WAL, VERBOSE, FORMAT JSON) & plain psql text ERROR: deadlock detected + DETAIL: server log excerpts
SQL Server & Azure SQL .sqlplan Showplan XML (Estimated & Actual runtime counters, missing indexes, spills) .xdl / Extended Events <deadlock> XML graphs
MySQL & MariaDB EXPLAIN FORMAT=JSON & MySQL 8.0+ EXPLAIN ANALYZE tree text SHOW ENGINE INNODB STATUS (LATEST DETECTED DEADLOCK)
YugabyteDB EXPLAIN (ANALYZE, DIST, FORMAT JSON) with DocDB RPC & storage read metrics PostgreSQL-compatible deadlock log excerpts
SQLite / LibSQL EXPLAIN QUERY PLAN (--SCAN / --SEARCH tree and classic tabular output) N/A

Extension Settings

Setting Default Description
culprit.codeLens.enabled true Show inline Paste EXPLAIN and Compare Plan CodeLenses above SQL statements and tagged templates.
culprit.diagnostics.enabled true Enable static SQL query and migration safety diagnostics in .sql and .ts/.tsx/.js files.
culprit.share.redactLiterals true Scrub SQL string and numeric literals before generating shareable links or exported reports.

Security & Privacy

  1. 100% Local WebAssembly Execution: Plan parsing, structural diffing, deadlock cycle detection, and HTML/Markdown rendering run locally inside @culpritsql/plans WebAssembly. No database credentials, queries, or plans are uploaded to any server.
  2. Strict Webview Content Security Policy: Every Webview renders under a per-session cryptographic nonce (default-src 'none'; script-src 'nonce-...' 'wasm-unsafe-eval') with zero remote scripts or telemetry beacons.
  3. Client-Side Redacted Sharing: Sharing to explain.culpritsql.com is strictly opt-in, scrubs SQL literals by default, and stores the compressed payload inside the URL #s=z1... fragment so the payload is never sent in HTTP request paths.

License

MIT License. Copyright (c) 2026 Cristian Pufu.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft