Debugging
Wyn supports source-level debugging with DWARF debug info.
Quick Start
bash
wyn debug app.wynThis compiles your code at -O0 with full debug info and launches lldb.
Setting Breakpoints
(lldb) breakpoint set --file app.wyn --line 5
(lldb) runThe debugger maps machine addresses back to your .wyn source lines.
How It Works
When you use wyn debug, the compiler emits C code with #line directives that map back to your .wyn source, then compiles at -O0 -g to produce DWARF debug information:
- Compile unit — your
.wynfilename and directory - Subprograms — each function with line numbers
- Line table — maps machine addresses to source lines
This is the same debug format used by C, C++, Rust, and Swift.