1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Answers
    4
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Exclamation Unanswered: Logging to XCode console...

    Unanswered: Logging to XCode console...


    I thought of an idea that could help me understand (and debug) Sencha Touch but I'm having some difficulty with it. I have already watched Tommy Maintz's excellent video on debugging, etc...

    The idea: Since I have a debug version of ST (sencha-touch-all-debug.js), I could add some debug logging to various functions/methods to follow the flow of my MVC application. This would be tremendously useful as I am using XCode/PhoneGap/SenchaTouch. The problem is that the logs are not showing up in the XCode console. The only thing that reliably works is alert(). I tried console.log(), debug.log(), Ext.log, Ext.Logger.warn(), and throw. How can I get this to work?


    e.g.

    Code:
       onBeforeLaunch: function() {    
            alert('onBeforeLaunch:');
                
            if (this.autoCreateViewport) {
                this.getView('Viewport').create();
            }
    
    
            var controllers = this.controllers,
                ln = controllers.length,
                i, controller;

  2. #2
    Sencha User
    Join Date
    Dec 2007
    Posts
    39
    Vote Rating
    0
    danderson is on a distinguished road

      0  

    Default debugging tool

    debugging tool


    have you looked into using Weinre to debug?

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Answers
    4
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Default


    Quote Originally Posted by danderson View Post
    have you looked into using Weinre to debug?
    Yes. I am using Weinre. I just checked the Weinre debugger console and saw some logs. However, when I restarted my app, they disappeared but strangely enough now show up in XCode for the first time in over 100 different attempts. I'm not sure what is going on here.

    Update - Now nothing is showing up. I tried restarting Weinre, restarting the app, cleaning the app and restarting it, etc... No logs!

Thread Participants: 1