setScriptSource
Edits JavaScript source live.
In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a Debugger.restartFrame
for the top-most function is automatically triggered.
Edits JavaScript source live.
In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a Debugger.restartFrame
for the top-most function is automatically triggered.
Parameters
Id of the script to edit.
New content of the script.
If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
If true, then scriptSource
is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.