Working on Windows 7. Developing for a Nexus 5.
Comments applicable to AppInventor environment
Developing a full-featured app with several screens and lots of procedures.
Here's the problem - During runtime, I was getting an error message about accessing list items, something like I tried to access list element 1 but the list had 0 entries. This was odd as my code was checking for an empty list just prior to the suspected bad code.
After about a half day of debugging, putting in alert dialogs and so forth, I found the error in a different piece of code. I was actually doing a "lookup in pairs" and had inserted a closing " in the string, so the defined string was something like "foo"" instead of "foo"
I would have found the error much sooner (like seconds instead of hours) if the error message provided just a couple of pieces of information:
- The screen and procedure in which the error occurred. I.e. screen: screen1, procedure: myFunction1
- The actual function call that caused the error. I.e list:lookup_in_pairs
- The parameters passed to the function: i.e. key: "foo"", pairs: bar, not found: ""
Any one of these would have helped a lot. All three would have made it immediately obvious where the error lay.
Thanks!