sivacohan
V2EX  ›  问与答

JavaScrpit有类似logger的东西吗?可以记录每个函数,方法的执行时间,接受参数,返回值等。

  •  
  •   sivacohan · Mar 8, 2013 · 2823 views
    This topic created in 5016 days ago, the information mentioned may be changed or developed.
    目前在做项目,JS代码已经很长了。经常会有一些莫名其妙而且无法复现的bug出现。不知道有没有什么东西能记录JS的运行状态,方便查找bug出现的原因。
    3 replies  •  1970-01-01 08:00:00 +08:00
    unstop
    unstop
    Mar 8, 2013
    1
    请用现代浏览器+ console.log()
    ljbha007
    ljbha007
    Mar 8, 2013
    2
    V8 debugger
    sivacohan
    sivacohan
    OP
    Mar 8, 2013 via Android
    3
    @unstop 平时常用这个,但是我总不能每个函数都写啊。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1017 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:49 · PVG 02:49 · LAX 10:49 · JFK 13:49
    ♥ Do have faith in what you're doing.