Add global --debug option to print full tracebacks
Summary
Add a global --debug option (env var TESTING_FARM_DEBUG) available to all commands. When set, unexpected errors print the full traceback with local variables instead of the short, locals-free default.
Details
A top-level Typer callback flips pretty_exceptions_short and pretty_exceptions_show_locals when --debug is passed. Typer reads both attributes while rendering an unhandled exception in Typer.__call__, which runs after the callback, so the change takes effect without touching the entry point.
Usage (global options precede the subcommand; the env var works anywhere):
testing-farm --debug request --git-url ... --plan ...
TESTING_FARM_DEBUG=1 testing-farm request --git-url ... --plan ...Note
This affects unhandled exceptions only. Handled error paths that call exit_error() (for example, a non-200 API response) exit cleanly via typer.Exit and print no traceback by design.
Assisted-by: Claude Code