Confirmed users
496
edits
(Copy-edit; rearrange for clarity; split frame type descriptions.) |
(Describe source locations.) |
||
Line 495: | Line 495: | ||
== Source Locations == | == Source Locations == | ||
<i> | Descriptions of source locations (written as <i>location</i>) can take one of the following forms: | ||
<i> | { "url":<i>url</i>, "line":<i>line</i>, "column":<i>column</i> } | ||
<i> | This refers to line <i>line</i>, column <i>column</i> of the source code loaded from <i>url</i>. If column information i | ||
{ "eval":<i>location</i>, "line":<i>line</i>, "column":<i>column</i> } | |||
This refers to line <i>line</i>, column <i>column</i> of the source code passed to the call to eval at <i>location</i>. | |||
{ "function":<i>location</i>, "line":<i>line</i>, "column":<i>column</i> } | |||
This refers to line <i>line</i>, column <i>column</i> of the source code passed to the call to the <tt>Function</tt> constructor at <i>location</i>. | |||
As indicated, locations can be nested: a location like this one: | |||
{ "eval":{ "eval":{ "url":"file:///home/example/sample.js", "line":20 } | |||
"line":30 } | |||
"line":40 } | |||
refers to line 40 of the code passed to the call to eval occurring on line 30 of the code passed to the call to eval on line 20 of <tt>file:///home/example/sample.js</tt>. | |||
== Scope Contours == | == Scope Contours == |