Disable profiler for a particular method

Hi,

Is it possible to disable the profiler for a particular method or event? Since I’ve refactored a thread which used to run once (with it’s own loop) into a thread which runs many times I’m getting a very large number of entries in the profiler.

Something like

#pragma disableprofiler

Regards,

Lee

You can use StopProfiling/StartProfiling.

https://documentation.xojo.com/api/compiler_directives/stopprofiling.html

https://documentation.xojo.com/api/compiler_directives/startprofiling.html

Brilliant, perfect!

Any tips on getting it to START?
Im still unable to get profiling to happen on Windows.
Its been years…

It doesn’t work when remote debugging. If you compile with the profiler turned on, you’ll get a Profile.txt file next to the executable. You have to let the executable quit properly (i.e. not stop from the IDE) for the profiler to generate.

I only use the IDE from Mac, but the compiled windows version with profiling definitely works for me.

Regards,

Lee

For profiling to actually operate the application has to correctly quit. Otherwise the data isn’t output.