Display Block Execution Trace

55 views
Skip to first unread message

Ross Hamilton

unread,
Apr 10, 2023, 1:38:29 PM4/10/23
to Blockly
Hi there,

We are using Blockly to enable non-technical users to build FEEL expressions for business use cases.

When expressions are built with complex logic, we would like to enable them to follow the execution trace of the expression and show what blocks were executed.

Since Blockly only generates the code and doesn't really interact in any way with the execution, I suspect this is a non-trivial problem to solve. However, I was wondering if anybody has looked into doing something like this and where I could go to learn more.

Thanks!

Neil Fraser

unread,
Apr 10, 2023, 2:51:17 PM4/10/23
to blo...@googlegroups.com
Actually, this is well supported.  For a working example, just press the 'Run Program' button here:

https://blockly.games/maze?level=10#v7o5hy

To implement this, use your generator's STATEMENT_PREFIX property (or maybe STATEMENT_SUFFIX, depending on what works best for your application).  Here's the documentation:


Let us know if you have any questions.


--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/d120ffa1-7636-46e2-b11b-a92cebfc31acn%40googlegroups.com.


--
Neil Fraser, Switzerland
https://neil.fraser.name
Message has been deleted

Jalen Q

unread,
Apr 11, 2023, 11:14:43 PM4/11/23
to Blockly
gggggggggghhbhggggtgttg
Reply all
Reply to author
Forward
0 new messages