Live javascript debugging by recording function calls and parameters [duplicate]

别等时光非礼了梦想. 提交于 2019-11-28 23:23:06

Can you override Function.prototype.call and retrieve arguments and arguments.callee?

This would have the effect of reporting on ALL functions and therefore being super verbose, but maybe you'd want to filter.

Then you have the question of how you want to report, perhaps with if (console) console.log

you could take a look at http://ajax.dynatrace.com/ajax/en/ - its IE only but pretty darn good, see this article by j. Resig : http://ejohn.org/blog/deep-tracing-of-internet-explorer/ > "..dynaTrace provides some information that I’ve never seen before – in any tool on any browser."

@Jenko if what you're looking for something similar to an IDE debugger, in that case Internet Explorer 8 and 9 have a built-in Developer Tools (press F12) and Chrome has Developer Tools as well. Both IE and Chrome allow you to set breakpoints in your code and step through it while it's running. Firefox has Firebug, which others have mentioned, and it too allows to set breakpoints and examine the execution of your code. Opera has Dragonfly (built-in) and has the same features as the other browsers.

As I was reading the answers and laughing at the duplicate answers of "You can use Firebug!" I realized.... you can use Firebug.

Seriously, it has a "profile" command that does exactly what you are asking for. Safari and Chrome have this feature so you can check in there as well. IE8/9 has a "profiler" tool which is similar (but I don't know if it can be called from JavaScript with console.profile())

This will give you accurate times since any code and logging you add would also afect the actual performance. And because this feature is in the top browsers, you get a reasonable amount of data.

I've found fireflow: https://addons.mozilla.org/en-us/firefox/addon/fireflow/ incredible helpful.

If you're talking about browser-side javascript dedub you can use Firebug, which is an excellent tool.

http://getfirebug.com/

Here you can find a step-by-step tutorial:

http://www.digitalmediaminute.com/screencast/firebug-js/

Yes. all major browsers have a debugger built-in (IE, Chrome, Safari), or available as a add-on (Firebug for Firefox).

Firebug is good for this. Or you can use Google Chrome's built-in debugger as well.

for Firefox Firebug for IE deeloper tool for chrome built-in debugger is nice to use

Arguably the best online Javascript Code Quality Controll is JSLint. It not only checks code for errors, it improves the coding style of programmes entirely<< this is the reason the author has made it in the first place. My 0,02 $

http://www.jslint.com/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!