Search code examples
javascriptpretty-print

Reformatting JavaScript/JScript code?


I've got a JScript error on my page. I know where the error's happening, but I'm attempting to decipher the JScript on that page (to figure out where it came from -- it's on an ASPX page, so any number of user controls could have injected it).

It'd be easier if it was indented properly. Are there any free JScript reformatters for Windows?


Solution

  • You really should use Firebug or some similar debugging tool to actually find the problem, but, if you want to just format your JavaScript code, here's a reformatter I found on Google.