What is a good Javascript debugging tool?

后端 未结 16 782
渐次进展
渐次进展 2020-11-29 06:12

Haven\'t touch javascript for 3 years. Just got a javascript project and wanted to know any new ways or tools emerged these years to debug javascript? I used alert 3 years

16条回答
  •  情话喂你
    2020-11-29 06:34

    I argue to use build-in browser debugger for performance reason. Firefox and Chrome one are good enough.

    They allow browse DOM, show dynamically generated sources, show network activity, profile JS, etc.

    But don't miss printf-approach with:

    console.log("this is %o, event is %o, host is %s", this, e, location.host);
    

    and:

    console.log("%s", new Error().stack);
    

提交回复
热议问题