Repository navigation
Compiler Debugging Guide
0x4171341 edited this page Jul 24, 2026
·
1 revision
L++ exposes multiple debug dumps from the compiler pipeline.
Check one file:
lpp --check file.lpp
lpp check file.lppCheck a directory of .lpp files:
lpp --checkallImportant: the repository contains old negative tests and stale scratch files. Use a clean example directory for documentation checks.
lpp --dump-ast file.lpp
lpp --dump-symbols file.lpp
lpp --dump-types file.lppUse these when debugging:
- parsing problems
- name resolution
- wrong inferred types
- generic/type-param behavior
lpp --dump-escape file.lpp
lpp --dump-mir file.lppUse these when debugging:
- ARC behavior
- unexpected heap/stack classification
- closure capture
- match lowering
-
?operator lowering - short-circuit control flow
LPP_AOT=1 lpp file.lpp
# or
lpp emit file.lpp --aotThis produces .o on Linux/macOS and .obj on Windows.
lpp-link has an inspect mode:
lpp-link inspect file.o
lpp-link inspect file.objThis is useful for linker/runtime bugs:
- missing symbols
- wrong section layout
- COFF relocation debugging
- direct PE failures
lpp-link input.o runtime.o -o app
lpp-link pe input.obj runtime.obj -o app.exe
lpp-link macho input.o runtime.o -o appThe compiler supports benchmark-oriented timing output through environment variables used by CI:
BENCHMARK=1 LPP_AOT=1 lpp file.lppThis is used by benchmark workflows to collect phase timings.