Titanium does not give you a proper error when a javascript variable/function does not exist

You must Login before you can answer or comment on any questions.

I spent hours on debugging trying to figure out why my app stops working in some cases.

Titanium does not give you a proper error when a javascript variable/function does not exist

Example:

console.log(myObject); //works
console.dir(myObject); //does not work, and it does not give any error, 
//your app also does not execute anything past this point.

1 Answer

if you turn on validation in your preferences, you will get errors and warnings displayed in your source code

http://blog.clearlyinnovative.com/post/8145535204/titanium-appcelerator-quickie-jslint-configuration-in

— answered 2 years ago by Aaron Saunders
answer permalink
3 Comments
  • that helps somewhat, but this needs to be fixed from within the runtime environment, see my example above, jslint wont show that.

    — commented 2 years ago by David Dalcu

  • If you think the runtime environment should handle that, you should file this under Studio. It is not the job of the desktop to determine if your code is valid or not, IMO.

    — commented 2 years ago by Alan DuBoff

  • I dont think it should be the job of the studio, but the job of the Titanium "VM" to catch this exception and show it to the user, much like .NET throws exceptions, or Java.

    — commented 2 years ago by David Dalcu

Your Answer

Think you can help? Login to answer this question!