today i was writing a javascript code and i was debugging because i could not know where the error was coming from. i was using jquery and i got this error on my firefox firebug that says:

TypeError: o is undefined

ok, so what am i doing wrong.. i dont know so need to know on what line of the function i was calling to the problem was. the best way was to know where the line number of the code was where it broke the script.

so, its very easy, just put this code in your javascript

alert('LINE '+Error().lineNumber);

simple, it will show you an alert with the line number

hope that helps