SQL Visual Debugger
Find where your SQL result went wrong.
SQL Visual Debugger turns a SELECT query into a step-by-step visual debugger inside VS Code. Instead of staring at the final result and guessing, you can see how each query step transforms the data.

Debug SQL the way you debug code: step by step, with the intermediate state visible.
Stop guessing why a query returned the wrong rows
SQL bugs are hard because the final result does not show where the problem happened.
Was the row removed by WHERE?
Duplicated by a JOIN?
Grouped away by GROUP BY?
Filtered after aggregation by HAVING?
Changed by SELECT, CASE WHEN, or a window function?
SQL Visual Debugger shows each stage of the query so you can find the exact step where the result changed.
Trace rows through the query
Follow one row, or a set of matching rows, across the query flow.

Trace rows backward and forward through the debugger to see where they came from, how they changed, whether they matched a join, and where they disappeared.
Sort, filter, and inspect intermediate tables while you debug.

Use table filters and sorting to narrow large result sets, inspect JOIN matches, and review WHERE/HAVING filter previews without leaving the visual debugger.
Try it in 30 seconds
No database ready? Use the built-in SQLite demo playground.
- Open the Command Palette.
- Run
SQL Visual Debugger: Open Demo Playground.
- Step through the sample query with
Next and Previous.
Use it on your own SQL
- Open a
.sql file.
- Select one supported
SELECT query, or place your cursor inside it.
- Right-click and choose
SQL Visual Debugger: Debug Query.
- Connect to your database.
- Step through the visual result.
Database support
SQL Visual Debugger works with:
- MySQL: local or remote host, optional SSL, or a MySQL/MariaDB connection string
- PostgreSQL: local or remote host, optional SSL, or a PostgreSQL connection string
- SQL Server: local Windows Authentication, or local/remote SQL Server Authentication
- SQLite: local database files
Remote SQL Server connections require SQL Server Authentication and Encrypt.
SQL Visual Debugger includes:
- step-by-step intermediate results
- row tracing across query steps
- sortable and filterable result tables
- JOIN match inspection
- WHERE and HAVING filter previews
- GROUP BY source-row breakdowns
- DISTINCT value previews
- CASE WHEN result explanations
- window-function previews
- row-count changes between steps
Supported SQL
SQL Visual Debugger focuses on readable SELECT analysis queries and supports:
FROM
JOIN
WHERE
GROUP BY
HAVING
SELECT
DISTINCT
ORDER BY
LIMIT / TOP
CASE WHEN
- aggregate functions
- supported window functions
- CTEs
- supported
FROM subqueries
- supported
WHERE scalar subqueries
- supported
WHERE ... IN (...) subqueries
- supported
WHERE EXISTS (...) subqueries
Current boundaries
Some advanced SQL shapes are intentionally limited today, including UNION, recursive CTEs, non-equality joins, and some advanced subquery/window-function syntax.
When a query is outside the supported visual-debugging shape, the extension stops with a clear message instead of pretending to debug it.
Safety and privacy
SQL Visual Debugger is built for read-only debugging.
- Runs supported read-only
SELECT and WITH query shapes
- Blocks non-read-only SQL before execution
- May run additional read-only helper queries to build previews and step-by-step explanations
- Remote database debugging can use more network traffic and database resources than running the original query once
- Does not save passwords
- Keeps passwords only in session memory
Anonymous telemetry helps improve reliability and prioritize future support.
Telemetry never includes SQL query text, table names, column names, database names, credentials, hostnames, result data, file paths, or location fields.
Telemetry can be disabled with:
SQL Visual Debugger: Disable Telemetry
Feedback and issues
Found a bug or have feedback? Open an issue in the SQL Visual Debugger feedback repository.