debugging

Installation
Summary

Debugging tools for Turso database using bytecode comparison, logging, and deterministic simulation.

  • Bytecode comparison workflow identifies whether behavior differences stem from code generation bugs or VM/storage layer issues by comparing SQLite and Turso EXPLAIN output
  • Logging via RUST_LOG environment variable captures detailed traces from turso_core and simulator components during test runs
  • ThreadSanitizer stress tests detect threading issues across configurable thread counts and iteration counts
  • Deterministic simulation with seed-based reproduction allows consistent bug recreation in both the simulator and concurrent DST (Whopper) environments
  • Corruption analysis tools available in scripts directory for diagnosing WAL corruption and database integrity problems
SKILL.md

Debugging Guide

Bytecode Comparison Flow

Turso aims for SQLite compatibility. When behavior differs:

1. EXPLAIN query in sqlite3
2. EXPLAIN query in tursodb
3. Compare bytecode
   ├─ Different → bug in code generation
   └─ Same but results differ → bug in VM or storage layer

Example

# SQLite
sqlite3 :memory: "EXPLAIN SELECT 1 + 1;"
Related skills
Installs
631
GitHub Stars
18.7K
First Seen
Jan 28, 2026