[Dive4elements-commits] [PATCH 2 of 3] Add some debugging tips

Wald Commits scm-commit at wald.intevation.org
Fri May 24 09:23:40 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1369380159 -7200
# Node ID 806fa23dffb3276aa268cc630082d8b94601f144
# Parent  cdd9759b15b6745405c2d954f214695733274588
Add some debugging tips

diff -r cdd9759b15b6 -r 806fa23dffb3 artifacts/doc/datacage.txt
--- a/artifacts/doc/datacage.txt	Fri May 24 09:22:10 2013 +0200
+++ b/artifacts/doc/datacage.txt	Fri May 24 09:22:39 2013 +0200
@@ -145,4 +145,13 @@
 and invoked from another location within the document, e.g. with
 
                 <dc:call-macro name="basedata_4_heightmarks"/>
-.
+
+Debugging Tips:
+  - You can send a message to the Log (log level info) during the evaluation
+  of the datacage by using the <dc:message> element.
+  For example to activate a basic macro tracing you could do something like:
+      %s@\(<dc:macro name="\)\(.*\)\(".*>\)@\1\2\3\r<dc:message>\2</dc:message>
+  - To dump the variables that are currently on the stack you can use the
+  dc:dump-variables() fuction.
+  For example:
+    <dc:message>{dc:dump-variables()}</dc:message>


More information about the Dive4elements-commits mailing list