On this page
Debugging and inspecting a program
First distinguish a compiler proof failure from an execution failure. A proof failure is usually investigated through its source diagnostic, model and contracts. A wrong native result, foreign fault or unexpected exception calls for a debug build and a minimal reproducer.
Native source debugging
veradic build -g --project verada.toml -o app-debug
lldb ./app-debugAt the debugger prompt:
breakpoint set --file main.vadb --line 5
run
frame variable
thread backtrace
Replace the filename/line with a statement in your actual main. Build -g uses unoptimized native code, source line/column information and variable/type descriptions. On macOS it also runs dsymutil and writes app-debug.dSYM beside the executable. Keep that bundle with the matching binary. An old bundle or moved source tree can produce misleading source displays.
Scalar parameters/locals and loop variables, supported arrays/records/access values, tagged and class-wide representations have descriptions. Compiler temporaries and every advanced language abstraction are not guaranteed to have pleasant debugger presentations. Runtime-bound arrays can appear as descriptors containing Data/First/Last; a class-wide value may display alternative record layouts. The emitted debug language is chosen for debugger compatibility, so presentation is not an independent type-system definition.
macOS may ask you to allow the debugger to attach the first time. veradic lsp is not a debug adapter: debug from LLDB, or from an editor's own LLDB integration.
Inspect compiler decisions
veradic check --show-flow --project verada.toml
veradic check --dump-bir --project verada.toml
veradic emit --emit core --project verada.toml -o app.core
veradic emit --emit llvm --project verada.toml -o app.ll
veradic prove --dump-vcs vcs --no-cache --project verada.tomlFlow output shows inferred Global/Depends. Core inspection is based on the shared lowered form used by subsequent stages, useful for locating expansion and checking operational meaning. --dump-bir precedes ghost erasure; emitted Core reflects the selected mode, and its textual assertions do not encode every later native check-elision decision. LLVM output is normally optimized; use -g to inspect the unoptimized native path. VC files describe obligations for solver investigation. These are versioned inspection formats, not stable application APIs. Do not combine inspection flags with a single-document JSON diagnostic consumer.
Reports that another person can reproduce
Include the veradic --version output, the command, project file, required sources and C implementation, expected result, actual diagnostics/output, mode, solver/tool identities and whether a clean cache changes the result. Reduce the program without removing the condition that triggers it. A strict proof against an incorrect imported contract can still produce a wrong native result: include those assumptions in the reproducer.
B9001 indicates an internal code-generation/JIT failure, not a language property to work around silently. Preserve the source and any generated output when reporting it.