Find unused blocks

Hello
Sorry for my bad English.

during the creation of an app, many tests are often done and blocks and control variables are inserted.
I wanted to know if there is a way to find unused blocks and / or variables
thank you

You can tell if a variable is unused by deleting its init global variable block, checking if the error count increased, then doing an undo to reverse the damage.

If the error count did not increase, you probably don’t use that variable.

It’s probably a good idea to export an .aia file before starting this process.

Connect your device to Companion, disable (probably) unused blocks, reload the screen by making a small change in the designer. If there is no error message afterwards (after Screen.Initialize), run your app and check whether errors arise. If not, the disabled block was unnecessary and can now be deleted, otherwise undo disabling the block.

Hello
thanks to both for the suggestions