SaveProfile
From Xojo Documentation
Method
If profiling is on, this method causes the profiling information to be immediately saved to a file.
Notes
This method allows you to control when profiling data is saved in case your code is resulting in your app crashing and thus not saving profile data.