
Debugging
Debugging guide for tursodb covering bytecode diffs, tracing logs, ThreadSanitizer, seeded simulation, stack measurement, and corruption analysis.
- skills.sh installs
- 1.3K
- GitHub stars
- 25.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers EXPLAIN bytecode comparison against SQLite, RUST_LOG tracing, ThreadSanitizer runs, seeded simulator replays, and stack usage measurement
- Includes
scripts/stack/helpers (frame-sizes.sh,min-stack.sh,stack-profile.sh) andscripts/corruption-debug-tools/for WAL and integrity failures - Notes that
make testsetsRUST_LOG=off, so logs requirecargo runorcargo testinstead - Designed for Turso developers isolating whether a mismatch lies in code generation, the VM, or the storage layer
Install
$ npx -y skills add tursodatabase/turso --skill debugging -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Debugging Guide
Bytecode Comparison
When Turso and SQLite give different results, run EXPLAIN on both:
sqlite3 :memory: "EXPLAIN SELECT 1 + 1;"
cargo run --bin tursodb :memory: "EXPLAIN SELECT 1 + 1;"
Different bytecode means a bug in code generation (core/translate/). Same bytecode
with different results means a bug in the VM or storage layer.
Logging
tursodb logs with tracing. It reads RUST_LOG (default level: warn) and writes to
stderr, or to a file with -t <file> (--tracing-output).
RUST_LOG=turso_core=trace cargo run --bin tursodb -- -t /tmp/turso.log :memory: 'SELECT 1;'
Logs can reach megabytes. make test sets RUST_LOG=off, so use cargo run or cargo test to get logs.
Threading Issues
Run the stress test under ThreadSanitizer. It needs a nightly toolchain with the rust-src component, and --target set to the host target (x86_64-unknown-linux-gnu on Linux, aarch64-apple-darwin on Apple Silicon):
RUSTFLAGS="-Zsanitizer=thread" cargo +nightly run -Zbuild-std --target x86_64-unknown-linux-gnu \
-p turso_stress -- --vfs syscall --nr-threads 4 --nr-iterations 1000
Details
- Repository
- github.com/tursodatabase/turso
- Categories
- Debugging, Rust, Databases
- First seen
- May 16, 2026
More from tursodatabase/turso
All 7Similar to Debugging
More Debugging
differential-fuzzertursodatabase/turso1.2K installsTurso-vs-SQLite differential fuzzer that generates SQL, reproduces failures by seed, and minimizes them for probing.
debuggerzhaono1/agent-playbook678 installsSystematic debugging workflow that reproduces, isolates, and verifies fixes across JavaScript, Python, and Go.
core-dumpsmohitmishra786/low-level-dev-skills874 installsPractical crash triage for production core dumps: enabling collection, loading in GDB or LLDB, and resolving symbols.
rust-debuggingmohitmishra786/low-level-dev-skills627 installsPractical guide to debugging Rust binaries with GDB or LLDB, panics, backtraces, and async tasks.
golang-troubleshootingsamber/cc-skills-golang42K installsSystematic Go debugging methodology with pprof, Delve, race detection, and GODEBUG tracing for root-cause fixes.
debugparcadei/continuous-claude-v3510 installsRead-only investigation of logs, database state, and git history to diagnose issues during manual testing.