Loading ...
Sorry, an error occurred while loading the content.
 

Debugging in YUI 3

Expand Messages
  • Satyam
    I found debugging in YUI 3 quite tough. Most Node objects contain very few properties, the key is the yuid, which is a reference to some hash somewhere
    Message 1 of 5 , Sep 3, 2008
      I found debugging in YUI 3 quite tough. Most Node objects contain very
      few properties, the key is the yuid, which is a reference to some hash
      somewhere hidden. In order to inspect an element, sorry, Node, I have
      to do console.log of this and then of that, instead of just having a
      general look at the object and see if somethings looks funny.

      Also, some of the errors in the console are quite useless because they
      refer to errors within an object like yui-2-40, which tells me nothing.
      I can't break in that error, I can't get information related to it. I
      can't event know which of my many elements is the one related to the
      Node. There is no way I can find out what caused the error.

      Sometimes you can get the browser to break on one of such errors and it
      seems you are deep within some event listener that is responding to
      whatever I did. What was it that I did and caused all these? The depth
      of the call stack doesn't let me reach the originator! Which element
      are we talking about? At least, let me get a clue as to which element
      it is complaining about. Give me something!

      I'm sure there must be some trick somewhere, you must be doing some
      debugging. Please share.

      Satyam
    • Caridy Patino
      Hey Satyam, this was my first thought when I look into the current custom events implementation, which is quite similar to the bubbling extension
      Message 2 of 5 , Sep 4, 2008
        Hey Satyam, this was my first thought when I look into the current
        custom events implementation, which is quite similar to the bubbling
        extension implementation, so I have been dealing with the same issue
        for a while, and yes, it's hard to debug and it's hard to understand.

        I always end up creating listeners for debug only, to trace down the
        propagation and to get the current state for the application.

        I guess you guys (YUI Team) need to figure out how to provide a
        consistent way to debug the events propagation (DOM events and
        specially Custom Events) for debugging, or share the tricks with us.
        hehehe.

        Best Regards,
        Caridy Patino (caridy at yahoo-inc.com)
        Yahoo! LATAM

        --- In yui3@yahoogroups.com, Satyam <satyam@...> wrote:
        >
        > I found debugging in YUI 3 quite tough. Most Node objects contain very
        > few properties, the key is the yuid, which is a reference to some hash
        > somewhere hidden. In order to inspect an element, sorry, Node, I have
        > to do console.log of this and then of that, instead of just having a
        > general look at the object and see if somethings looks funny.
        >
        > Also, some of the errors in the console are quite useless because they
        > refer to errors within an object like yui-2-40, which tells me
        nothing.
        > I can't break in that error, I can't get information related to it. I
        > can't event know which of my many elements is the one related to the
        > Node. There is no way I can find out what caused the error.
        >
        > Sometimes you can get the browser to break on one of such errors and it
        > seems you are deep within some event listener that is responding to
        > whatever I did. What was it that I did and caused all these? The
        depth
        > of the call stack doesn't let me reach the originator! Which element
        > are we talking about? At least, let me get a clue as to which element
        > it is complaining about. Give me something!
        >
        > I'm sure there must be some trick somewhere, you must be doing some
        > debugging. Please share.
        >
        > Satyam
        >
      • Satyam
        Or built a plugin for the FireBug plugin, ;-) Otherwise, we are like decades ago when all the tools we had for debugging were printing to stderr or some other
        Message 3 of 5 , Sep 4, 2008
          Or built a plugin for the FireBug plugin, ;-)

          Otherwise, we are like decades ago when all the tools we had for
          debugging were printing to stderr or some other device. The debugger is
          meant to have all the code required to debug, we are not supposed to add
          code to our code to be able see what's going on.

          Satyam


          Caridy Patino wrote:
          >
          > Hey Satyam, this was my first thought when I look into the current
          > custom events implementation, which is quite similar to the bubbling
          > extension implementation, so I have been dealing with the same issue
          > for a while, and yes, it's hard to debug and it's hard to understand.
          >
          > I always end up creating listeners for debug only, to trace down the
          > propagation and to get the current state for the application.
          >
          > I guess you guys (YUI Team) need to figure out how to provide a
          > consistent way to debug the events propagation (DOM events and
          > specially Custom Events) for debugging, or share the tricks with us.
          > hehehe.
          >
          > Best Regards,
          > Caridy Patino (caridy at yahoo-inc.com)
          > Yahoo! LATAM
          >
          > --- In yui3@yahoogroups.com <mailto:yui3%40yahoogroups.com>, Satyam
          > <satyam@...> wrote:
          > >
          > > I found debugging in YUI 3 quite tough. Most Node objects contain very
          > > few properties, the key is the yuid, which is a reference to some hash
          > > somewhere hidden. In order to inspect an element, sorry, Node, I have
          > > to do console.log of this and then of that, instead of just having a
          > > general look at the object and see if somethings looks funny.
          > >
          > > Also, some of the errors in the console are quite useless because they
          > > refer to errors within an object like yui-2-40, which tells me
          > nothing.
          > > I can't break in that error, I can't get information related to it. I
          > > can't event know which of my many elements is the one related to the
          > > Node. There is no way I can find out what caused the error.
          > >
          > > Sometimes you can get the browser to break on one of such errors and it
          > > seems you are deep within some event listener that is responding to
          > > whatever I did. What was it that I did and caused all these? The
          > depth
          > > of the call stack doesn't let me reach the originator! Which element
          > > are we talking about? At least, let me get a clue as to which element
          > > it is complaining about. Give me something!
          > >
          > > I'm sure there must be some trick somewhere, you must be doing some
          > > debugging. Please share.
          > >
          > > Satyam
          > >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - http://www.avg.com
          > Version: 8.0.169 / Virus Database: 270.6.16/1651 - Release Date: 04/09/2008 6:57
          >
          >
        • Satyam
          A suggestion: Could we have a Debug version which, besides logging, makes some of the key parts of YUI public? It is really hard to figure out what s going on
          Message 4 of 5 , Sep 26, 2008
            A suggestion:

            Could we have a Debug version which, besides logging, makes some of the
            key parts of YUI public? It is really hard to figure out what's going
            on when all you get from your debugger is a YUI Id number and have
            nowhere to look at it.

            Satyam


            Satyam wrote:
            >
            > Or built a plugin for the FireBug plugin, ;-)
            >
            > Otherwise, we are like decades ago when all the tools we had for
            > debugging were printing to stderr or some other device. The debugger is
            > meant to have all the code required to debug, we are not supposed to add
            > code to our code to be able see what's going on.
            >
            > Satyam
            >
            > Caridy Patino wrote:
            > >
            > > Hey Satyam, this was my first thought when I look into the current
            > > custom events implementation, which is quite similar to the bubbling
            > > extension implementation, so I have been dealing with the same issue
            > > for a while, and yes, it's hard to debug and it's hard to understand.
            > >
            > > I always end up creating listeners for debug only, to trace down the
            > > propagation and to get the current state for the application.
            > >
            > > I guess you guys (YUI Team) need to figure out how to provide a
            > > consistent way to debug the events propagation (DOM events and
            > > specially Custom Events) for debugging, or share the tricks with us.
            > > hehehe.
            > >
            > > Best Regards,
            > > Caridy Patino (caridy at yahoo-inc.com)
            > > Yahoo! LATAM
            > >
            > > --- In yui3@yahoogroups.com <mailto:yui3%40yahoogroups.com>
            > <mailto:yui3%40yahoogroups.com>, Satyam
            > > <satyam@...> wrote:
            > > >
            > > > I found debugging in YUI 3 quite tough. Most Node objects contain very
            > > > few properties, the key is the yuid, which is a reference to some hash
            > > > somewhere hidden. In order to inspect an element, sorry, Node, I have
            > > > to do console.log of this and then of that, instead of just having a
            > > > general look at the object and see if somethings looks funny.
            > > >
            > > > Also, some of the errors in the console are quite useless because they
            > > > refer to errors within an object like yui-2-40, which tells me
            > > nothing.
            > > > I can't break in that error, I can't get information related to it. I
            > > > can't event know which of my many elements is the one related to the
            > > > Node. There is no way I can find out what caused the error.
            > > >
            > > > Sometimes you can get the browser to break on one of such errors
            > and it
            > > > seems you are deep within some event listener that is responding to
            > > > whatever I did. What was it that I did and caused all these? The
            > > depth
            > > > of the call stack doesn't let me reach the originator! Which element
            > > > are we talking about? At least, let me get a clue as to which element
            > > > it is complaining about. Give me something!
            > > >
            > > > I'm sure there must be some trick somewhere, you must be doing some
            > > > debugging. Please share.
            > > >
            > > > Satyam
            > > >
            > >
            > >
            > > ----------------------------------------------------------
            > >
            > >
            > > No virus found in this incoming message.
            > > Checked by AVG - http://www.avg.com <http://www.avg.com>
            > > Version: 8.0.169 / Virus Database: 270.6.16/1651 - Release Date:
            > 04/09/2008 6:57
            > >
            > >
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - http://www.avg.com
            > Version: 8.0.169 / Virus Database: 270.6.16/1651 - Release Date: 04/09/2008 6:57
            >
            >
          • kamiltrebunia
            I have nothing more to add, but I want to support this complain - debugging applications is the biggest issue with this library for me, and I didn t even get
            Message 5 of 5 , Oct 1, 2008
              I have nothing more to add, but I want to support this complain -
              debugging applications is the biggest issue with this library for me,
              and I didn't even get into programming of big apps.
            Your message has been successfully submitted and would be delivered to recipients shortly.