Click or drag to resize

DebuggerClientSetScriptSourceAsync Method

Version 111.2.70
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.

Namespace:  CefSharp.DevTools.Debugger
Assembly:  CefSharp (in CefSharp.dll) Version: 111.2.70.0 (111.2.70.0)
Syntax
public Task<SetScriptSourceResponse> SetScriptSourceAsync(
	string scriptId,
	string scriptSource,
	bool? dryRun = null,
	bool? allowTopFrameEditing = null
)

Parameters

scriptId
Type: SystemString
Id of the script to edit.
scriptSource
Type: SystemString
New content of the script.
dryRun (Optional)
Type: SystemNullableBoolean
If true the change will not actually be applied. Dry run may be used to get resultdescription without actually modifying the code.
allowTopFrameEditing (Optional)
Type: SystemNullableBoolean
If true, then `scriptSource` is allowed to change the function on top of the stackas long as the top-most stack frame is the only activation of that function.

Return Value

Type: TaskSetScriptSourceResponse
returns System.Threading.Tasks.Task<SetScriptSourceResponse>
See Also