From a926c8f109eafeeebce5e316ac059b1c67d894e5 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Fri, 27 Aug 2021 09:47:43 +0200 Subject: [PATCH] dev: Some debug notes --- doc/dev.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/dev.md b/doc/dev.md index cdd901d9..0ed0d112 100644 --- a/doc/dev.md +++ b/doc/dev.md @@ -22,3 +22,14 @@ decoder code be a bit ugly over producing a tree that is hard to understand. - Try to have add symbols for all named constants. +## Debug + +Send `log` package output and stderr to a file that can be `tail -f`:ed: +```sh +LOGFILE=/tmp/log go run main.go ... 2>/tmp/log +``` + +gojq execution debug: +```sh +GOJQ_DEBUG=1 go run -tags debug main.go ... +```