Debugger.setScriptSource

Edits JavaScript source live.

{
  "name": "setScriptSource",
  "parameters": [
    {
      "name": "scriptId",
      "$ref": "Runtime.ScriptId",
      "description": "Id of the script to edit."
    },
    {
      "name": "scriptSource",
      "type": "string",
      "description": "New content of the script."
    },
    {
      "name": "dryRun",
      "type": "boolean",
      "optional": true,
      "description": " If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code."
    }
  ],
  "returns": [
    {
      "name": "callFrames",
      "type": "array",
      "optional": true,
      "items": {
        "$ref": "CallFrame"
      },
      "description": "New stack trace in case editing has happened while VM was stopped."
    },
    {
      "name": "stackChanged",
      "type": "boolean",
      "optional": true,
      "description": "Whether current call stack  was modified after applying the changes."
    },
    {
      "name": "asyncStackTrace",
      "$ref": "Runtime.StackTrace",
      "optional": true,
      "description": "Async stack trace, if any."
    },
    {
      "name": "exceptionDetails",
      "optional": true,
      "$ref": "Runtime.ExceptionDetails",
      "description": "Exception details if any."
    }
  ],
  "description": "Edits JavaScript source live."
}