VSQLite Explorer
Browse, query, and edit SQLite databases directly from the VS Code sidebar.
Early release — please open an issue if you hit a snag.
Features
- Connections sidebar — add, edit, and remove SQLite connections with persistent storage
- Schema navigation — browse Tables, Views, and Indexes in a collapsible tree
- Table preview & editing — view rows, edit cells in-place, insert new rows, commit or discard changes
- Create Table — define columns, types, constraints, and optional indexes
- Query Editor — run ad-hoc SQL with a results grid (SELECT) or change summary (INSERT/UPDATE/DELETE)
- Integrity Check — run
PRAGMA integrity_check on any connection
- Double-click to open — click any
.sqlite, .db, .sqlite3, or .db3 file to auto-register and browse it
- Connection options — configure journal mode, synchronous, busy timeout, foreign keys, cache size, temp store, and read-only mode per connection
Installation
From Marketplace
Search for VSQLite Explorer in the VS Code extensions panel, or install from the command line:
code --install-extension ChristopherThomas.vsqlite-explorer
From Source
git clone https://github.com/antimatter-studios/vsqlite-explorer.git
cd vsqlite-explorer
npm install
npm run build
Press F5 to launch the Extension Development Host.
Usage
- Click the VSQLite Explorer icon in the activity bar
- Click + to add a SQLite database file
- Expand a connection to browse tables, views, and indexes
- Click a table to preview its data — edit cells, insert rows, then Submit or Discard
- Right-click a connection for Query Editor, Connection Properties, or Integrity Check
Or simply double-click any .sqlite / .db / .sqlite3 / .db3 file in the explorer.
Commands
| Command |
Description |
vsqlite-explorer.addDatabase |
Add a SQLite database connection |
vsqlite-explorer.removeDatabase |
Remove a connection |
vsqlite-explorer.showProperties |
Edit connection properties and PRAGMA options |
vsqlite-explorer.openTable |
Open table preview |
vsqlite-explorer.createTable |
Create a new table |
vsqlite-explorer.queryEditor |
Open the SQL query editor |
vsqlite-explorer.integrityCheck |
Run PRAGMA integrity_check |
Requirements
Building & Publishing
# Full build (TypeScript + webviews)
npm run build
# Package as .vsix
npm run package
# Publish to both VS Code Marketplace and Open VSX
npm run publish:all
# One-step release (bump version + package + publish)
npm run release:patch # 0.1.0 → 0.1.1
npm run release:minor # 0.1.0 → 0.2.0
npm run release:major # 0.1.0 → 1.0.0
Publishing requires tokens in .env.local:
vscode-extensions=<your-azure-devops-pat>
openvsx-extensions=<your-openvsx-token>
NPM Scripts
| Script |
Description |
build |
Compile TypeScript + build all webviews |
compile |
TypeScript compilation only (esbuild) |
watch |
Watch mode for development |
lint |
TypeScript type-check (tsc --noEmit) |
webviews:build:all |
Build all webview bundles |
webviews:watch |
Watch and rebuild webviews |
package |
Build + create .vsix in build/ |
publish:vscode |
Publish .vsix to VS Code Marketplace |
publish:openvsx |
Publish .vsix to Open VSX |
publish:all |
Publish to both marketplaces |
test:unit |
Run unit tests (58 tests) |
test:unit:watch |
Watch mode unit tests |
Known Limitations
- Table preview loads up to 50 rows (no pagination yet)
- Query Editor executes one statement at a time
- No CSV/JSON export or import
- Read-only connections prevent all mutations by design
Architecture
The extension uses @vscode/sqlite3 for database access — Microsoft's fork of sqlite3 built with Node-API (N-API) for stable ABI compatibility across Node.js and Electron versions. This eliminates the native module version mismatch errors that plague extensions using sqlite3 or better-sqlite3.
The build pipeline uses esbuild to bundle TypeScript into a single extension.js, with a plugin that copies the native vscode-sqlite3.node binding alongside it and intercepts the binding loader at bundle time.
Webviews (table preview, query editor, etc.) are React + Zustand apps built with Vite, communicating with the extension host via postMessage.
Testing
npm run test:unit
Tests use real temporary SQLite databases (no mocking) with fixture generators for mixed data types, special character names, foreign keys, large tables, read-only databases, and more.
Changelog
v0.3.0 — 2026-03-03
- Right-click any table in the sidebar to open Query Editor pre-filled with a SELECT query
- Search button in table preview toolbar to open Query Editor for the current table
- Draggable split handle in Query Editor between SQL input and results
- Fixed: Query Editor context menu now works on table nodes (was database-only)
- Renamed all internal command IDs from
vsqlite.* to vsqlite-explorer.* for full consistency
v0.2.0 — 2026-03-03
- Switched from
sqlite3 to @vscode/sqlite3 (Microsoft's N-API fork) — eliminates NODE_MODULE_VERSION mismatch errors across VS Code/Electron versions
- Updated esbuild config to bundle
vscode-sqlite3.node native binding
- Added 54 unit tests for all database operations with fixture generators
- Updated sidebar icon
- New marketplace logo
v0.1.1 — 2026-03-03
- Bumped version for marketplace republish
- Fixed repository URLs for renamed repo
- Fixed marketplace category (Other instead of Developer Tools)
- Removed deprecated CI runner (darwin-x64)
v0.1.0 — 2026-03-02
- Renamed from SQLite Explorer to VSQLite Explorer
- Centralized all extension IDs into
src/constants.ts
- Double-click
.sqlite / .db / .sqlite3 / .db3 files to open and browse
- Custom editor shows database overview with clickable table list
- Fixed webview bundle path resolution (now works in any workspace)
- New sidebar icon and marketplace icon
- Publishing support for VS Code Marketplace and Open VSX
- GitHub Actions workflow for automated releases
v0.0.1 — 2026-03-01
- Initial release
- Connections sidebar with add, edit, remove
- Schema tree navigation (tables, views, indexes, columns)
- Table preview with inline cell editing and row insertion
- Create Table panel with column definitions and indexes
- Query Editor for ad-hoc SQL execution
- Connection properties with PRAGMA configuration
- Integrity check command
- Read-only connection support
License
MIT