start_profiler
Start a performance capture in the running Godot game and return control immediately. Keep playing the game while it records, then stop the capture to retrieve results.
Instructions
Start a profiler capture and return immediately, so simulate_input, run_script and screenshots can drive the game while it records. Requires run_project with profiling: true. Stops itself after seconds (default 30, max 60); call stop_profiler for the results. Returns: active, firstFrame, captureLimit, maxSeconds. Use profile_project instead for an unattended window. Errors if a capture is already running or profiling was not enabled at launch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seconds | No | Maximum capture duration before the automatic stop, greater than 0 and at most 60 (default: 30). | |
| captureLimit | No | Rows the engine puts in each frame packet, 16..512 (default: 512). Godot selects them by inclusive time, so a lower limit hides cheap functions and sets limitReached. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| active | No | ||
| firstFrame | No | ||
| maxSeconds | No | ||
| captureLimit | No |