开发者

What tool do you use for debugging Javascript? [closed]

开发者 https://www.devze.com 2022-12-12 07:24 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that 开发者_开发百科this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I've notices I'm not capable to debug correctly js. I'm only using alert() as a spread sentences technique but I need something better. So... which tool do you use?


For Firefox Firebug it's the best, has a lot of useful features, the Console API is great, you can log, make assertions, profiling, timing and much more.

For IE, the Developer Tools of IE 8 is better than nothing, for earlier versions of IE, try the Developer Toolbar.

For Chrome and Safari, check the WebKit inspector and debugging tools.


In Firefox, Firebug and its console which provides a panel for debugging along with an object for programmatically evaluating inside of a script, eg

console.log('test')

Safari and the family of Webkit enhanced browsers have built-in inspectors/consoles.

Opera has Dragonfly.

There are several plugins for Internet Explorer, such as DebugBar and IE8 has a pretty neat built-in Developer Toolbar.

If you're on Linux you can even install spidermonkey-bin, which is the interpreter used by Firefox and invoke it with js in the console.


Chrome and IE8 have surprisingly good debugging consoles.

If you use Firefox, you'll need to install Firebug to compete.


For cross-browser logging you could use log4javascript.


Firebug is very good. However, if you are on Windows you should check out the Developer Tools in IE 8. The integrated debugger allows for breakpoints and uses a lot of great elements probably taken from Visual Studio concepts. You have an interactive console, etc. You can get to it using F12.


Firebug lite is also good in a pinch


Firebug's a must. I've recently also started to use IE8's inner debugging tool and it's pretty nice as well.


To track down performance issues:

  • Of course there is Firebug with Yahoo's yslow plugin
  • Internet Explorer has dynaTrace Ajax (John Resig blogged about it lately).
  • Google Chrome now has the Speed Tracer extension.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号