views:

55

answers:

2

I have wrapped calls to firebugs console.log in a logging function (that checks for existance of console along with other flags)

for example:

Log(string) { if (console && DEBUG) console.log(string); }

my issue is that the firebug console shows the line number of the console.log function call rather then the Log function call.

Is there any way to change what line numbers firebug shows?

A: 

console.trace() will give you the call stack.

See http://getfirebug.com/logging for more info.

Spudley
console.trace gives me the full stack trace. I just want to know the stack trace 1 level up without clogging up the console
Raynos
A: 

Firebug does not allow you to change the line number on the console via code.

Raynos