Debugging the debugger.

    sad eagle's picture
    2007
    19
    Dec

    I've spent some time recently trying to get Konqueror's JavaScript debugger in a shippable form for 4.0. The debugger was changed heavily from the 3.x version in a SoC project, making ground for much nicer UI. Unfortunately, it also barely worked.

    I've fixed up a chunk of the issues, but there is still a long way to go in fixing up some remaining holes, and doing testing to improve stability. But, it's at least good enough for a screenshot:
    [image:3159]
    ... as well as some simple debugging tasks. Anyway, I am sort of curious: what do readers want from such a debugger? Now, I probably can't incorporate any non-minor suggestions in 4.0 (feature/string freeze), but it'd be good to know what direction to take, and some minor stuff is certainly tweakable.

    Comments

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.
    kabsi's picture

    Console logging would be nice

    I don't now why but my comment has been "flagged as spam" and as such did not appear here. So I repost it with all the nice
    links and references removed. What about setting up a captcha instead?


    It would be nice if Konqueror would support logging to the Javascript Console as Safari does using
    windows.console.log("your text here")

    It would be even nicer if it could support all logging features that Firebug sports:

    console.log(object[, object, ...])
    console.debug(object[, object, ...])
    console.info(object[, object, ...])
    console.warn(object[, object, ...])
    console.error(object[, object, ...])
    

    This logging facility is increasingly widespread, even Internet Explorer supports it if you install
    IE WebDeveloper V2.

    chani's picture

    awesome

    awesome. :)

    it's been ages since I quit the evil job where I had to do javascript, so I don't need this myself... but I'm still really happy to see it :)

    nikotto's picture

    wow, this looks

    wow, this looks great!

    Currently I use FireBug a lot, some nice features are:
    - dockable in the browser (you can step the script and see the output above)
    - show variable content in tooltip
    - flash dom-node in browser if mouse is moved over a dom-node in a watchpoint or console-output
    - option to Break on all errors

    All other very useful Firebug-features are out of the scope of a JS-Debugger.

    niko

    sad eagle's picture

    Thanks for the suggestions.

    Thanks for the suggestions. Sounds useful, though definitely 4.1 stuff... It doesn't really work all that well yet, some things are very tricky to get right :(

    Regarding showing of variable contents in tooltips --- how does it work with different scopes, contexts. etc?

    And, well.. It also seems like firebug gets it right in that debugging web stuff is an integrated experience.

    moltonel's picture

    Firebug is impressive; it's

    Firebug is impressive; it's the reason I switch back to firefox when doing any JS development. So feel free to steal features from them :)

    The way backtraces are shown is also quite nice. You get a "semi-expanded" view of the arguments, and pretty much anything is clickable to get to its definition.

    Alas, as nikotto said the rest is out of scope for a JS debugger / for 4.0.

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.