SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Non-Member
    Join Date
    Jul 2005
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auditing Javascript

    I'm needing to audit some pretty horrible looking code and wondered if there were any good tools that will provide a break down of methods and global variables etc. rather than having to dissect it line by line.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you looked at JSLint?
    Birnam wood is come to Dunsinane

  3. #3
    Non-Member
    Join Date
    Jul 2005
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't know it could be used for profiling, however the code I'm looking at produces about 200 validation errors so it's not particularly useful. I need something which will ignore the crapness of the code and just dump information about it. Had no luck via Google

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After the validation part it does provide a list of objects, external variables etc that are used in the analysed code. That's why I thought it might be of help.
    Birnam wood is come to Dunsinane

  5. #5
    Non-Member
    Join Date
    Jul 2005
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me it only does that if the validation passes, or, if the error percentage is below a certain value, I am not sure why Douglas has done that!

    Anyway, in the end I used the DOM tool in Firebug, if you go to options you can show only user defined variables, which was very useful, EXCEPT for the fact you can't actually export the results.

    I'm really surprised someone hasn't done a proper profiling tool that maybe gives you some pretty charts etc....maybe a new project idea?

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Bob Carologees View Post
    For me it only does that if the validation passes, or, if the error percentage is below a certain value, I am not sure why Douglas has done that!
    Ah. I've only used JSLint a few times, and I probably didn't submit sufficiently bad code to it. I tend to use fairly simple JavaScript anyway.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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