Do It

App Inventor provides one great tool for testing and debugging: Do It. You can right-click on any block at any time, as long as a device or emulator is connected, and select Do It from the menu. This option runs that block immediately on the device, even if it is not inside an event (see Figure 8.7).

Image

Figure 8.7 Using the Do It feature to immediately run any block.

The Do It feature is simple, and you can use it in many ways, depending on what blocks you have and what you need to test. Here are some examples of how you can use Do It to help with testing and debugging:

Reset lists (set a list to an empty list)

Move sprites to start locations ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.