Alternative to Android Studio’s Database Inspector — lighter, portable, and independent of any IDE.
Inspect and query your on-device SQLite databases directly from VS Code, with real-time access through an embedded HTTP server.
This VS Code extension lets you connect to a running Flutter or Dart app and inspect its local SQLite database as if it were on your desktop.
It works by connecting (via ADB or TCP) to a lightweight HTTP server provided by the sqlite_inspector Dart package, which exposes a REST API for SQLite operations.
The extension automatically lists databases, tables, and schemas, and allows you to run SQL queries, view results, and export them to CSV — all inside VS Code.
Use cases
- Debugging local persistence in Flutter apps.
- Exploring on-device data without pulling
.db
files.- Replacing Android Studio’s Database Inspector with a cross-platform, open-source alternative.
┌────────────────────┐ ┌─────────────────────────┐
│ VS Code (host) │──────>│ sqlite_inspector server │
│ sqlite-inspector │<──────│ (on device / emulator) │
└────────────────────┘ HTTP └─────────────────────────┘
▲
│ adb forward tcp:7111 tcp:7111
│
Flutter app (debug)
- VS Code extension → handles UI (Explorer, Console, Results Panel).
- Dart package → runs a local
HttpServer
(SqliteInspector.start()
). - ADB → forwards the TCP port (
7111
by default) to the device.
Add the Dart package to your app:
dependencies:
sqlite_inspector: ^0.0.1
Then enable it only in debug mode:
import 'package:flutter/foundation.dart';
import 'package:sqlite_inspector/sqlite_inspector.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
if (kDebugMode) {
await SqliteInspector.start(); // Default port 7111
}
runApp(const MyApp());
}
adb forward tcp:7111 tcp:7111
Check that the server responds:
curl http://127.0.0.1:7111/v1/health
- Open VS Code → Command Palette (
Ctrl + Shift + P
/Cmd + Shift + P
). - Run SQLite Inspector: Connect (ADB).
- Choose your connected device.
- Explore your database and run queries!
Category | Description |
---|---|
🔌 ADB Connection | Detects devices, forwards port 7111, connects via HTTP. |
🗃️ Explorer View | Lists databases → tables → columns. |
📋 SQL Console | Run queries directly (Ctrl + Enter ). |
📊 Result Panel | Table view for query results (auto-scroll, sticky headers). |
💾 Export / Copy CSV | Save or copy query results. |
🔒 Safe defaults | Loopback-only, DDL disabled by default, optional token. |
⚙️ Custom settings | Port, token, page size, auto-refresh interval. |
Setting | Default | Description |
---|---|---|
sqliteInspector.port |
7111 |
Forwarded port for the HTTP server. |
sqliteInspector.token |
"" |
Optional x-debug-token for auth. |
sqliteInspector.pageSize |
200 |
Default row limit for SELECT * . |
sqliteInspector.autoRefresh |
false |
Future use — auto-refresh based on PRAGMA data_version . |
All settings can be modified in Settings → Extensions → SQLite Inspector.
Command | Action |
---|---|
SQLite Inspector: Connect (ADB) | Connect to a debug device. |
SQLite Inspector: Disconnect | Stop connection and clear state. |
SQLite Inspector: Run Selection | Execute selected SQL (Ctrl + Enter). |
SQLite Inspector: Toggle DDL | Allow schema modifications temporarily. |
SQLite Inspector: Export CSV | Save current result to a .csv file. |
SQLite Inspector: Copy CSV | Copy last result to clipboard. |
SQLite Inspector: Refresh Tree | Reload database list and tables. |
Although designed for Flutter developers, the system is generic.
Any app that can start an HTTP server exposing the same REST API as sqlite_inspector
will work — including Dart CLI tools, desktop apps, or even IoT devices.
The extension doesn’t depend on Flutter tooling; it only needs an HTTP endpoint.
- Multi-platform support (Android, Desktop, iOS via iproxy).
- Live refresh via
PRAGMA data_version
. - WebSocket streaming.
- Secure channel & token rotation.
- Possible Flutter Web proxy mode.
- This extension is licensed under the MIT License © 2025 Cristian Cisneros.
- Portions of code (Explorer structure, Results Panel rendering, CSV export logic) are adapted from
AlexCovizzi/vscode-sqlite, licensed under the Apache License 2.0.
See
NOTICE
andLICENSE
for details.
- Alex Covizzi for the original
vscode-sqlite
inspiration. - The Flutter and Dart community for making developer tooling so accessible.
- Everyone who contributes or reports issues — thank you!
- 🧠 Dart package: sqlite_inspector
- 🧰 Extension source: ccisne-dev/sqlite-inspector-vscode
- 💬 Report issues: GitHub Issues