1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    58
    Answers
    1
    Vote Rating
    0
    pret is on a distinguished road

      0  

    Default Unanswered: Help with debugging issues

    Unanswered: Help with debugging issues


    Hi guys,

    I'm noticing that I'm having a lot of problems at debug time in Javascript. I recognize that I'm not that comfortable developing at the client side as I am at the server side. But I started to work with ExtJS and, amazed with everything it can do, that thought was put a side and I did my best to learn a lot about developing in Javascript, using Firebug, etc. I've been using ExtJS for a couple of months now, but I'm still getting lots of issues to figure it out where I did something wrong and why.

    I use Firebug, I set breakpoints, I look at the stack, and I try with Chrome when non of the Firebug tools help, but sometimes they only show cryptic errors that are in no way close to where the real error is.

    As an example, let's say I forgot to register a dependency in the "requires" property of a class. When I run the app, I receive some error about a namespace, or that "c" is not a constructor. Now I recognize what it means because I've fixed lots of this type of errors, but yet it's a pain to find the spot where the dependency is not registered, because in the stack there's no reference of any class of mine, and if I point to the variables in the left panel of the "script" tab of Firebug, I try to see if anyone contains a value that I can recognize (for instance, one class of mine that needed to be instantiated), but I don't find anything.

    So, the point is that, after 15-30 minutes (sometimes a lot more) I find the issue, but I feel frustrated, because the error was so little and the debug tools couldn't help me.

    Before the question, I'd like to summarize some of the things I do to debug:
    • As I said, I use Firebug, setting breakpoints where the error was thrown, looking at the stack if there's a known place (my classes), and looking at the left panel of the script tab so I can see if I recognize a value of some of the variables that appear there.
    • I tried to use extjs-debug.js instead of extjs-all-debug.js but, at least in version 4.0.2, if I added the locale for the spanish language it was throwing errors, so I had to use extjs-all-debug.js instead.
    Now my question: Can you give me some tips or pointers about this? what am I missing when I debug my apps? is there any good books that talk about this topic?



    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    danikuehni is on a distinguished road

      0  

    Default Feeling the same

    Feeling the same


    Hi pret, hi community

    I feel exactly the same frustration, when it comes to debugging JavaScript in general and playing with the Sencha tools in particular.

    I am usually working with Eclipse (mostly with Java, but actually with PHP, too) and using the new Eclipse plugin from Sencha bundled with the Sencha complete package.

    I was trying to get a decent debugging feeling using this plugin (based on VJET), but I did not succeed.

    Reading the advices about debugging in the Learn part of the forum did not really help me that much. So I really second pret's request for more hints and information about good debugging assistance especially using Eclipse in my case would be very appreciated.

    Thanks for any suggestions.
    Daniel

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    28
    Vote Rating
    1
    desp is on a distinguished road

      0  

    Default


    Welcome to Javascript :-)

Thread Participants: 2