标签:#javascript

Posts

· 2018-04-10 · * javascript *

From https://medium.com/appsflyer/10-tips-for-javascript-debugging-like-a-pro-with-console-7140027eb5f6

  • console.trace()
    If you want to know where the log is being prompted from use console.trace() to get the stack trace with the logged data.

  • console.time() and console.timeEnd()
    If you are trying to find a sneaky performance issue, start counting time with console.time() and print with console.timeEnd().

  • console.memory
    If your performance issue is even trickier, and you are looking for a sneaky memory leak, you might like to try and utilize console.memory (property, not a function) to check out your heap size status.

  • console.profile(‘profileName’) and console.profileEnd(‘profileName’)