Help in debugging macros and Action Blocks

Dm114

Well-known member
When debugging a macro, it's sometimes useful to know the value of some variables during the process. In a macro, it's possible to stop execution and check values of the suspect variables. In an Action Block it's much more complicated. Moreover, when execution stops (Cancel action) it's not possible to resume.

This simple and useful Action Block "SpyDisp" can display 2 types of variables (1 numerical and 1 string type) per call. After display interruption the process resumes.

Of course it's possible to include as many "SpyDisp" calls as necessary in macros as well as in Action Blocks. They can be Disabled/Enabled depending on debugging needs.

INPUT variables to be displayed (all optional):
• Number: decimal variable
• String: string variable
• Flag: string variable to identify the call in case of multiple calls. It can be a number, a label or a comment.

Then, the display window will show the name of the macro or Action Block, the content of "Flag" (if any), the current values of "Number" and "String"

💡 If "String" begins with an equal sign "=", it is considered as a formula and the result will be displayed as well.

 

Dm114

Well-known member
When debugging a macro, it's sometimes useful to know the value of some variables during the process. In a macro, it's possible to stop execution and check values of the suspect variables. In an Action Block it's much more complicated. Moreover, when execution stops (Cancel action) it's not possible to resume.

This simple and useful Action Block "SpyDisp" can display 2 types of variables (1 numerical and 1 string type) per call. After display interruption the process resumes.

Of course it's possible to include as many "SpyDisp" calls as necessary in macros as well as in Action Blocks. They can be Disabled/Enabled depending on debugging needs.

INPUT variables to be displayed (all optional):
• Number: decimal variable
• String: string variable
• Flag: string variable to identify the call in case of multiple calls. It can be a number, a label or a comment.

Then, the display window will show the name of the macro or Action Block, the content of "Flag" (if any), the current values of "Number" and "String"

💡 If "String" begins with an equal sign "=", it is considered as a formula and the result will be displayed as well.

New version with improved calling Macro/Action Block cancellation: it wasn't cancelled correctly in some cases.

Enjoy!
 
Top