C++ Debugging and Lifetimes
Start with the generated application's build and test output, then request
cpp_lib_core/assist/runtime/debug.md and the entity/action guide involved.
Preserve the first failure and the actual runtime identity before changing
configuration. See First Verification for what the
published release and this documentation check establish.
| Symptom | What to inspect | Recovery |
|---|---|---|
| Conan cannot find a binary | Remote, authentication and both profiles: Linux/x86_64, Clang 23, C++20, libstdc++11, Debug | Activate the released toolchain and use the emitted profiles. Keep --build=never when verifying published binaries. |
CMake cannot find teaql_cpp | Conan installation output and conan_toolchain.cmake path | Run Conan first and configure with the Quick Start's relative toolchain path. |
| Runtime version/source conflict | conanfile.txt, teaql-workspace.yaml, CMake cache and runtime_selection.json | Use exactly 0.2.0. Release mode requires the installed package and an empty TEAQL_RUNTIME_SOURCE; use a separate build directory when switching modes. |
No tests were found | Generated application target and CTest discovery | Use --no-tests=error; do not count empty discovery as success. The public starter has fewer tests than the retained graph example. |
| Query cannot execute | Both comment and purpose, and the UserContext that created Q | Supply non-empty intent and execute through that same trusted user_context. |
| Update rejects incomplete state or a stale version | Selected scalar fields and original version | Load complete authoritative scalar state before modification; reload and resolve a conflict instead of dropping its version check. |
| Value reports NotLoaded | Projection and explicit relationship selection | Select the needed field/relation. A getter does not fetch missing data; NULL and a loaded empty list are separate states. |
| Result or callback fails after Context close | Owning Context, pending operations and retained references | Finish work and consume borrows before close; explicitly copy retained data into its destination scope. |
| Audit delivery fails after commit | Structured error and actual database state | Recover delivery without assuming the database rolled back or blindly repeating the write. |
| Regeneration overwrites application work | Target and output directory | Generate the starter once; regenerate only cpp-lib-core into cpp_lib_core/, then restore/check markers. |
Capture useful evidence
Retain model and generator identity, runtime/package revisions, compiler and
Conan profile, commands, exit codes and sanitized output. Keep
runtime_selection.json alongside the report. Consult the generated Debug
guide for current diagnostic configuration; logging format, SQL tracing and
application audit have separate responsibilities.
Keep credentials and private payloads out of query intent, audit reasons and published logs. A smoke test establishes only the exercised operation; attach application-specific policy and lifecycle tests before making broader claims.