CMake compile_commands.json Flag & Include-Path Debugger
Debug clangd include errors, ODR-breaking -D macro mismatches, mixed -std=c++17 vs c++20 flags, and duplicate -I paths in your Clang Compilation Database without writing jq one-liners—100% locally in your browser.
| Source File | Compiler & Standard | Opt / Debug | Defines (-D) | Includes (-I / -isystem) |
|---|
Debug compile_commands.json Without Wrestling With Raw JSON or jq
Every CMake, Meson, Bazel, and Bear project exports a Clang JSON Compilation Database to power clangd, clang-tidy, and static analyzers. When one subdirectory accidentally builds with -std=c++17 while the rest uses -std=c++20, or a macro like -DNDEBUG or -DUSE_SIMD=1 is inconsistently defined across targets, raw JSON viewers make the drift nearly invisible. This dedicated browser debugger tokenizes every compiler invocation locally and flags cross-file flag drift immediately.
Browser Debugger vs. Raw JSON Viewer & jq CLI
| Criteria | QuickCoderHub (In-Browser) | Generic JSON Viewer / jq |
|---|---|---|
| Compiler Flag Tokenization | Splits -I, -isystem, -D, -std=, -O automatically | Treats command as one opaque escaped string |
| ODR & Standard Drift Audit | Automatically detects conflicting -std=, -O, and -D values | Requires custom Python/jq scripts |
| Code Privacy | 100% browser-local; proprietary paths never uploaded | Local CLI |
Frequently Asked Questions
Does this support both command strings and arguments arrays?
Yes. The Clang Compilation Database spec allows either a shell-quoted "command" string or a pre-split "arguments" array, and this parser handles both seamlessly.
Why did it flag mixed -O0 and -O2 or mixed -std= standards?
Mixing debug/release defines (like -DNDEBUG) or C++ language standards across linked translation units can break ABI compatibility or produce mysterious debug-only crashes.
How do I generate compile_commands.json for plain Makefiles without CMake?
Install Bear and run bear -- make -j to intercept compiler invocations and emit a standard compile_commands.json.
Does my compilation database leave my computer?
Never. Everything runs 100% client-side in your browser tab.