Results 1 to 4 of 4

Thread: How to use FireBug to look at object?

  1. #1

    Default How to use FireBug to look at object?

    I'm struggling a bit with understanding how to look at various objects in FireBug. One such example is the Try Catch block. It passes back an "err" object. How do I see the err object's various properties in FireBug? I purposely caused an error to occur, but I can't figure out how to inspect it in FireBug. Any help would be appreciated.

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Use console.log() or console.dir() to output objects to the console log.

  3. #3

    Default

    Hi there,

    I have just been learning these kind of things myself so I will give what limited knowledge I have figured out to date.

    First, I am not sure if you are asking about seeing a backend or frontend exception. For the backend, it depends what mechanism you used to communicate the information back to the front (if at all). In my case, I captured the backend exception, popped it into a Json message and shipped that back to the front. I then decode the Json message and can inspect that. My decoding code is:
    Code:
            var serverResponse;
            try {
                serverResponse = Ext.decode(response.responseText);
            }
            catch(ex) {
                this.showError(response.responseText);
                return;
            }
    The raw Json message is in response.responseText and so I can insepect both the message and the decoded result.

    Fortunately this code snippet also shows a frontend JS try/catch, so in this case you sould be able to inspect ex in firefox to see what made this pop.

    Hopefully you find this helpful. Happy hunting.

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    It's thrown errors that are the problem.

    Eveything else displays nicely in Firebug. Just exceptions need to be logged to the console to be able to see the call stack.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •