start_profiling
Starts V8 CPU profiling on a browser tab to find JavaScript causing slow or unresponsive pages. Reproduce the issue, then stop profiling on the same tab.
Instructions
Start the V8 CPU profiler on a tab (active tab by default, or tabIndex). Use to find which JavaScript makes a page slow or unresponsive: start, reproduce the problem (navigate/click/wait), then call stop_profiling on the same tab. Don't use it for network slowness; list_network_requests shows that. The 1000µs default suits most slowness; lower samplingIntervalUs (e.g. 100) only to catch functions shorter than a millisecond, at the cost of more overhead and a larger profile. Profiling continues until stop_profiling, so always stop it. Returns a confirmation. Fails if that tab is already being profiled; the running recording continues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabIndex | No | Tab to profile, by its 0-based list_pages index. Default: the active tab. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. | |
| samplingIntervalUs | No | Microseconds between stack samples; smaller is more detailed but heavier. Default 1000. |