I’m using console.log(var_name); to debug JS code in chrome and am wondering, is there a way to output to the console the line at which the current function was called?
I’m using console.log(var_name); to debug JS code in chrome and am wondering, is there
Share
You can get the stack trace with the following:
You could then use a regular expression to filter out the line number: http://jsfiddle.net/8wA74/.