← Back to Debugger domain

Debugger.enable

Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

Domain: Debugger stable

Parameters

NameTypeDescription
maxScriptsCacheSize (optional)numberThe maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.

Returns

NameTypeDescription
debuggerIdRuntime.UniqueDebuggerIdUnique identifier of the debugger.

Example Request

{
  "id": 1,
  "method": "Debugger.enable"
}

Example Response

{
  "id": 1,
  "result": {
    "debuggerId": "debuggerId-value"
  }
}

Usage in Node.js

const result = await send('Debugger.enable');
console.log(result);
// {"debuggerId": "debuggerId-value"}