Development Error Console

by bob@jetzig.dev

2024-11-24

Jetzig now provides a development-mode error debug console.

To use the console, simply run the latest version of the Jetzig CLI with the server command:

jetzig server

Alternatively, pass the debug_console option explicitly to zig build:

zig build -Ddebug_console=true run

The debug console is only available when the following criteria are met:

  • Jetzig environment is set to development
  • -Ddebug_console=true is passed to zig build (done automatically by jetzig server)
  • Zig's optimization mode is Debug or ReleaseSafe

Backtrace

All available backtrace frames are rendered with source code syntax highlighting in context with surrounding lines.

Response Data

Response data represented as JSON, pretty-printed with syntax highlighting.

Zmpl Errors

Although not yet integrated with Jetzig's debug console, Zmpl now generates debug tokens in compiled templates when running in debug mode, mapping errors back to the template that generated them.


Comments

Zack
I do believe this is a mighty fine looking blog post If I do say so.

Leave a Comment