IT:AD:JScript:Debugging

* Chrome:

* FireBug:

* F12:

  • Use console.log(msg), console.debug, console.info, console.warn, console.error, console.clear to send message to the debugger window.
    • Works in all browser now (older IE's didn't support it).
      • “+1. And for the benefit of anyone arriving at this question now, it's worth pointing out that since the question was answered, all browsers have now implemented the console object, so console.log() etc should work in all browsers, including IE. However, in all cases, you need to have the debugger window open at the time, otherwise calls to console will generate errors. – Spudley Feb 10 '11 at 14:59” (Src)

Scenario

Need to walk up the stack to find out variables

Solution

From the immediate console, use something like arguments.callee.caller to walk up the stack.

  • /home/skysigal/public_html/data/pages/it/ad/jscript/debugging.txt
  • Last modified: 2023/11/04 03:26
  • by 127.0.0.1