Click or drag to resize

DebuggerClientSetScriptSourceAsync Method

Version 130.1.90
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.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax
public Task<SetScriptSourceResponse> SetScriptSourceAsync(
	string scriptId,
	string scriptSource,
	bool? dryRun = null,
	bool? allowTopFrameEditing = null
)

Parameters

scriptId  String
Id of the script to edit.
scriptSource  String
New content of the script.
dryRun  NullableBoolean  (Optional)
If true the change will not actually be applied. Dry run may be used to get resultdescription without actually modifying the code.
allowTopFrameEditing  NullableBoolean  (Optional)
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

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