Method

# StartProfiling

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Starts the Code Profiler from gathering profiling information.

## Usage

``` xojo
StartProfiling
```

## Notes

This method starts profiling again after the `StopProfiling</api/compiler_directives/stopprofiling>` method has been called. You still need to have Profile Code enabled in the Project menu.

If you call `StopProfiling</api/compiler_directives/stopprofiling>` in the App.Opening event to stop the Code Profiler from profiling all the code in your app then you can then put <span class="title-ref">StartProfiling</span> in only the methods you want to profile.

## Compatibility

|                       |                               |
|-----------------------|-------------------------------|
| **Project Types**     | Console, Desktop, Mobile, Web |
| **Operating Systems** | iOS, Linux, macOS, Windows    |

<div class="seealso">

`StopProfiling</api/compiler_directives/stopprofiling>` method; `Code Profiler</getting_started/debugging/code_profiler>` topic

</div>
