Debugger: Difference between revisions

Jump to navigation Jump to search
Clarify descriptions of functions that operate on lexical environments.
m (→‎Debugging hooks: Make error report property names look nicer.)
(Clarify descriptions of functions that operate on lexical environments.)
Line 436: Line 436:


<dt>getFunctionScope()
<dt>getFunctionScope()
<dd>If the referent is a function, return a <code>Debug.Object</code> instance referring to the lexical scope that enclosed the function when it was created. If the referent is not a function, throw a <code>TypeError</code>.
<dd>If the referent is a function, return a <code>Debug.Object</code> instance referring to the lexical environment enclosing the function when it was created. If the referent is not a function, throw a <code>TypeError</code>.


<dt>decompile([<i>pretty</i>])
<dt>decompile([<i>pretty</i>])
<dd>If the referent is a function, return the source code for a JavaScript function definition equivalent to this function in its effect and result, as a string. If the referent is not a function, throw a <code>TypeError</code>. If <i>pretty</i> is present and true, produce indented code with line breaks.
<dd>If the referent is a function, return the source code for a JavaScript function definition equivalent to this function in its effect and result, as a string. If the referent is not a function, throw a <code>TypeError</code>. If <i>pretty</i> is present and true, produce indented code with line breaks.


<dt>parent()
<dt>outerEnvironment()
<dd>If the referent is part of a chain of lexical scopes, return a <code>Debug.Object</code> instance referring to its enclosing lexical scope, or <code>null</code> if it is the outermost scope. If the referent is not part of such a chain, throw a <code>TypeError</code>.
<dd>If the referent is a lexical environment, return a <code>Debug.Object</code> instance referring to its enclosing lexical environment, or <code>null</code> if it is the outermost environment. If the referent is not a lexical environment, throw a <code>TypeError</code>.


<dt>referentToString()
<dt>referentToString()
Confirmed users
497

edits

Navigation menu