Adding a watcher - Unit 3 Lesson 14 Level 10a

Students are trying to add a watcher and they keep getting an error. It won’t let them add it. What are we doing wrong?

@dcraig,

Can you let us know what kind of watcher they are trying to add and what the error is?

All that will help us to figure out what is going on.

thanks,

Mike

Here’s the watchers I added to this level and they appeared to be working correctly, but we are happy to help if we have some more information.

Screen Shot 2022-02-03 at 2.56.08 PM

Mike

I think I am just misunderstanding what/when you would use a watcher. Could you clarify this for me and how they are created? Thank you

A watcher allows you to “watch” the changing value of a variable while the program is running so you can debug problems. In this lesson, for example, if the balloon wasn’t popping at the right time, I could install the watcher for the scale to see if the scale was increasing and if so, if it reached the threshold where it should pop. Then, I could see if it was a scaling issue or if it was reaching the threshold but still not popping, I could look elsewhere for the problem.

Here’s a link on the documentations for using watchers.

Mike

1 Like