Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript line number mapping

Tags:

javascript

Magically formatted comments will change the reported line number of javascript errors in some browsers; They look like this:

//@line n "f"

n is the line number and f is the file name. Unfortunately, //@line appears to be ungoogleable. Does anyone know where there is documentation on this feature, and which browsers support it?

(I found references to it here and here.)

like image 805
Sean McMillan Avatar asked Apr 07 '11 16:04

Sean McMillan


1 Answers

From what I can find it is only available in Mozilla based browsers.

It is using the JS_SetOptions command which can turn these options on or off depending on the values passed.

https://developer.mozilla.org/en/JS_SetOptions

like image 172
Ryan Matthews Avatar answered Sep 23 '22 09:09

Ryan Matthews