Question

I have an strange problem with sencha touch. I have an application, where there are Select fields, And on change of select field value I am applying some rules, as per my business rules.

Rules are

  1. Rules is like i am removing all of the field elements from the form and adding them again.
  2. I am retaining the previous selected value
  3. Removing some values from the store attached to the select field.

Now, it is working absolutely fine with the chrome, safari browser and the iPad device browser. But now it is giving strange problem in iPhone and Android device. The screen gets stuck. No events are allowed after changing the value in select field.

Steps Taken; Also, I have put alert as logger at each step of the source code to ensure the infinite loop. I have also put the exception handlers to ensure the error occurred. No errors, neither ant infinite loop running which might cause memory/run-time issue.

Can anyone provide me link to the any debugger that I could use either in android or iPhone to debug the JavaScript code written in Sencha Framework.

Edit-1

I have come across the RemoteJS from sencha portal remote-javascript-debugging-on-android Also, I have installed Android SDK and QT, bot don't know how to start with debugging.

Was it helpful?

Solution

Can't tell anything about the android-part of your question.

Weinre is something that gets usually proposed when it comes to Javascript-Debugging on the iPhone.

Another solution is described here, but it only work with IOS5 in the Simulator. For my own needs I choosed that one because I had the impression that it's easier and quicker to setup. http://hiediutley.com/2011/11/22/debugging-ios-apps-using-safari-web-inspector/ .

OTHER TIPS

This solution is the ultimate as of iOS 6.0 -- it makes all other solutions obsolete. See: Is there a way to debug JavaScript in the iPhone/iOS Safari browser?

Chrome Android browser has remote debugging - see https://developers.google.com/chrome-developer-tools/docs/remote-debugging

The setup is a bit tricky, but gives you a normal chrome developer console for your mobile.

I have a problem with JS not working on 1st iPad and Android (they both have old version of Webkit), the code was not running and there where lot of files so I ended up with fetching each file using ajax and call eval in try catch.

var pre = $('pre');
var filename = '/path/to/file.js';
$.get(filename, function(file) {
   try {
       eval(file);
   } catch(e) {
       pre.html(pre.html() + filename + '\n' +
                e.message + '\n' + e.stack + '\n----\n');
   }
}, 'text'); // text - so jQuery don't eval the code

as you see in the code I dump stack trace into pre tag.

I've also found that webkit in 1st iPad and Andorid (2.3) don't allow delete and default as properties (I think that's the same with IE).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top