For many Protopie users components are a little scary. One factor that reinforces this is the fact that the variable tracker does not enable you to inspect a variable that is inside a component.
As a result, when something is not working within a component it can be hard to find a way to see what is happening and what is going wrong.
A common solution to this is to add a text field into the component and have its value be the variable you want to inspect. But this requires that you have space for an extra text field and don’t mind its disruption to your emerging design. You can. of course, show and hide this field as you need to.
An alternative solution is to use a ‘Detect’ trigger and a ‘Speak’ response. Within the component simply add a trigger for detecting a change in the variable of interest (or add one for each variable) and use the response to speak the value of the variable. You can add text around the value of the variable, or have multiple variables spoken in sequence, using the normal string concatenation operator +.
You can keep this code in your component and disable it when it is not needed, and then turn it on as needed.