Welcome to Tasker Tip Tuesdays, quick tips to help grow your Tasker knowledge. This week I discuss escaping variable Names for task debugging. If you need help debugging your Tasker Tasks you’ll love this useful tip.
Debugging in Tasker
Debugging variables is integral to Tasker. In fact, the same follows for programming in general. And what better way to do so than to use a flash Action. When debugging, I find it to be the best solution. I typically place them in strategic locations where I think the Task will result in an error. But just flashing the variable, “%var”, is not enough information to thoroughly debug. Ideally you will want to reference both the variable name and it’s value. The problem is when placing the variable in a flash Action, Tasker evaluates it, providing the value rather than it’s name.
Escaping Variable Names
One solution to see both the name and value of a variable is to escape it. Within Tasker’s user guide variables section, Pent explains how to escape variable names:
“If you want to prevent a variable name being replaced, put a \ in front of it e.g.
Variable Set, %new, \%old
Will set the value of %new to %old, not the value of %old.
This is a perfect example of how to escape variable names to debug Tasker Tasks, whether simple or complex.
Now that you understand how to escaping variables let’s play around with some examples to get a better understanding.
While this may not be the reason Pent added this feature, it certainly serves a great purpose for debugging. If you have been following this series and watched some previous videos you will notice that I use this feature often. Below is an example of how I typically use the above method in a flash Action:
\%best_website_eveerrrrrrr has a value of: www.RoryCodes.com
To catch up on previous posts in this series, visit the Tasker Tip Tuesdays page. As ways, enjoy and keep learning! Until the next Tasker Tip Tuesday…