# Build and tools

- **Normal build:** `aurac` is built with the project and runs before the target.
- **Cross-builds** (embedded): `aurac` must run on the build machine. Build it natively once and pass it with `-DAURAC_EXECUTABLE=/path/aurac`. `libs/aura-lang` has no dependencies for this purpose.
- **Errors** in an `.aura` file stop the build with `file:line:column: error: ...`, for example an unknown property, unknown ID, ID used before its definition, incorrect type, unknown field, unknown signal, or duplicate type or file name. Missing theme values are reported by the C++ compiler, also with the `.aura` line thanks to `#line`.
- **`#line`:** the code for each property, each `repeat` list, and each `if` condition is preceded by `#line <line> "<file.aura>"`, followed by a `#line` returning to the generated file. Compiler errors, backtraces, and the debugger therefore point to the `.aura` line; in gdb, `break abort.aura:10` works. The column in compiler messages still refers to the generated code. To debug the generated C++, disable this with `-DAURA_LINE_DIRECTIVES=OFF` (CMake) or `aurac --no-line`.
- **VS Code:** `tools/aura-vscode` provides highlighting, formatting, completion (properties for each element type, components across the entire UI tree, `place` directives, IDs, theme values), error checking while typing (`aurac --check`, without a running preview), and live preview. Installation and tests: [tools/aura-vscode/README.md](../tools/aura-vscode/README.md). After changing `schema.h`, run `node tools/aura-vscode/scripts/generate.js`.
