Skip to main content

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.

SymptomWhat to inspectRecovery
Conan cannot find a binaryRemote, authentication and both profiles: Linux/x86_64, Clang 23, C++20, libstdc++11, DebugActivate the released toolchain and use the emitted profiles. Keep --build=never when verifying published binaries.
CMake cannot find teaql_cppConan installation output and conan_toolchain.cmake pathRun Conan first and configure with the Quick Start's relative toolchain path.
Runtime version/source conflictconanfile.txt, teaql-workspace.yaml, CMake cache and runtime_selection.jsonUse 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 foundGenerated application target and CTest discoveryUse --no-tests=error; do not count empty discovery as success. The public starter has fewer tests than the retained graph example.
Query cannot executeBoth comment and purpose, and the UserContext that created QSupply non-empty intent and execute through that same trusted user_context.
Update rejects incomplete state or a stale versionSelected scalar fields and original versionLoad complete authoritative scalar state before modification; reload and resolve a conflict instead of dropping its version check.
Value reports NotLoadedProjection and explicit relationship selectionSelect 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 closeOwning Context, pending operations and retained referencesFinish work and consume borrows before close; explicitly copy retained data into its destination scope.
Audit delivery fails after commitStructured error and actual database stateRecover delivery without assuming the database rolled back or blindly repeating the write.
Regeneration overwrites application workTarget and output directoryGenerate 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.