From bf5b403bea4275c49c397ee9226b5da489dcea79 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Fri, 23 Apr 2021 15:48:43 +0200 Subject: [PATCH] doc: update `dbg_trace` docs --- doc/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/debugging.md b/doc/debugging.md index 08288c615d..797742984e 100644 --- a/doc/debugging.md +++ b/doc/debugging.md @@ -20,7 +20,7 @@ Notable trace classes: * `Meta.isDefEq`: unification * `interpreter`: full execution trace of the interpreter. Only available in debug builds. -In pure contexts, one can instead use `dbgTrace! "msg with {interpolations}" val`, which will print the message directly to stderr before evaluating val. `dbgTraceVal val` can be used as a shorthand for `dbgTrace! "{val}" val`. +In pure contexts or when execution is aborted before the messages are finally printed, one can instead use the term `dbg_trace "msg with {interpolations}"; val` (`;` can also be replaced by a newline), which will print the message directly to stderr before evaluating `val`. `dbgTraceVal val` can be used as a shorthand for `dbg_trace "{val}"; val`. Note that if the return value is not actually used, the trace code is silently dropped as well. ## Debuggers