← Back to Profiler domain

Profiler.startPreciseCoverage

Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

Domain: Profiler stable

Parameters

NameTypeDescription
callCount (optional)booleanCollect accurate call counts beyond simple 'covered' or 'not covered'.
detailed (optional)booleanCollect block-based coverage.
allowTriggeredUpdates (optional)booleanAllow the backend to send updates on its own initiative

Returns

NameTypeDescription
timestampnumberMonotonically increasing time (in seconds) when the coverage update was taken in the backend.

Example Request

{
  "id": 1,
  "method": "Profiler.startPreciseCoverage"
}

Example Response

{
  "id": 1,
  "result": {
    "timestamp": 1.0
  }
}

Usage in Node.js

const result = await send('Profiler.startPreciseCoverage');
console.log(result);
// {"timestamp": 1.0}