Hi Mounib,
You wrote to me privately, please don't
<<
Do you mean that it’s the only way to capture some internal
variables values while debugging or is there any good practice to do so.
remember the idea is to track the variables not to build something.
Naively I would say, Is there a way to call external functions (in whatever language) to process some local computations ?
<<
The best practice of developing App Inventor apps is to experiment and to develop
incrementally. Use the AI companion on a real phone if possible.
Too often I see some very large projects with umpteen screens, no procedures and thousands of blocks, in a forrum post with title "help!, it does not work, why?". Well, I do not know and I do not want to find out..
The debugging facilities in App Inventor are, in order of my preference:
1. DoIt. Can easily be used to see what values of global variables are and what results of procedure calls are.
2. Debug labels. You can see what happens on your screen, useful if things change releatively fast. It is easy to get rid of them by making them invisible (or finally, when your project is ready, just delete them).
3. Notifiers. Error messages in a notifier is always a good idea. You can also use notifier warnings to display what is happening in your app. You can get rid of them by disabling or deleting the block quite easily.
4. Really a last resort (so far I never neeeded it), when things go very wrong, is to use logcat.
Calling external functions, apart from making procedures within App Inventor is not possible. You would have to write an extension to do that, but that does not seem a good idea just for the purpose of debugging something.
Cheers, Ghica.