I note a real dearth of similes for debugging Javascript on the 'Net. A Google Search for the specific term only yields a few results.

I'll let you:

  1. vote on the current "best" simile; and

  2. propose a new one.

I expect, if we're lucky, we can create a new meme.

Good luck!

    I'm confused... do you use the Chrome web browser? I've found debugging Javascript to be quite easy, actually.

      It's much easier since FireBug was written, and Chrome's tool is nearly as good.

      Still, compared to, say, PHP, debugging Javascript is like herding cats.

        yeah - before every browser came with a console, however, I'd completely agree.

          ...like debugging PHP, just a bit worse.

            I find debugging Javascript to be like... walking without moving my arms.

            Its a simple task if you can stay focused on it, but one distraction and things start moving again!

              All I know is, I do both of these things more than I probably should have to:

              die("<pre>".print_r($something,1)."</pre>");
              
              alert(some_variable);
              

              🙂

              PS: For the first one, I have a keyboard macro in Komodo edit -- actually 2: one that creates that die() statement with a generic variable name, and one which creates it using whatever is in the clipboard for the variable name. 🆒

                NogDog;11012889 wrote:
                alert(some_variable);
                

                That is totally what this morning's been like, and still no real progress. :rolleyes:

                  Yikes... I can see why you'd be doing it 10 years ago, but why mess with alert() nowadays? Fire up Chrome (perhaps FireBug does this as well?), set a breakpoint in the JS code, and start hovering over variables.

                    Debugging JavaScript is like going outside during a thunderstorm and attempting to dodge rain.

                    NogDog;11012889 wrote:

                    All I know is, I do both of these things more than I probably should have to:
                    PS: For the first one, I have a keyboard macro in Komodo edit -- actually 2: one that creates that die() statement with a generic variable name, and one which creates it using whatever is in the clipboard for the variable name. 🆒

                    I use a similar technique in Komodo Edit; I've created a code snippet with the abbreviation "print", with a tab stop for the variable name. I just type "print" and hit ctrl-t and my cursor is immediately placed to where I need to enter the variable. 🆒

                      14 days later
                      Bonesnap;11012899 wrote:

                      Debugging JavaScript is like going outside during a thunderstorm and attempting to dodge rain.

                      Naked.

                      I'm going to amend mine: "Debugging Javascript is like herding cats with Linux".

                      Debugging PHP is like herding cats with FreeBSD, a fence, and an electric cattle prod. 😉

                        2 months later

                        A new discovery (for me) ... debugging Javascript ... in PDF documents.

                        That's kinda like stabbing yourself over and over with a pitchfork. 😉

                          5 days later
                          dalecosp;11017539 wrote:

                          A new discovery (for me) ... debugging Javascript ... in PDF documents.

                          Javascript shouldn't even be in those types of documents in the first place, I feel your pain :-/

                            Ashley Sheridan;11018413 wrote:

                            Javascript shouldn't even be in those types of documents in the first place, I feel your pain :-/

                            Hee hee, true; fortunately the marketing department is handling that. The only problem ... no programming experience. So, I spent a couple hours with a young lady over there trying to make some things work. For her, it's knowing how to program ... syntax, curly braces and conditionals and such. For me, it's the different (unique?) DOM for a PDF...

                            At least it was a change from "normal", which is occasionally a Good Thing(tm). I've not heard much more about it this week. I think she's waiting 'til after the Thanksgiving holiday here.

                              Write a Reply...