How to use StartProfiling and StopProfiling?

I’m having a senior moment with StartProfiling and StopProfiling. How do I use those? I’m quite sure I have used the 2 commands before when beta testing 2018r2. But I can’t get them to work in 2018r3. If I have this code:

[code]StartProfiling

call MailboxCursor.Query()

StopProfiling[/code]

how do I get the result? I really only need to know what happens for the call to MailboxCursor.Query and nothing else. Profiling works if I do Project/Profile Code but this profiles everything. What did I miss?

First, Profile Code must be checked in any case.

As you say, that profiles everything by default so make the first line in App.Open StopProfiling. After that, only the section(s) you want will be profiled.

Good to have in your project template by default.
@Beatrix Willius , remember this conversation ?

@Joost Rongen: this is what I remembered, too. But I never used StopProfiling in App.Open before.

Anyways: I made a new version with profiling on, sent it to the customer. Now I hope I get something back. I really screwed something up because what took seconds before is now taking minutes. And I don’t see anything.

@Beatrix Willius Hope you will be able to find the constipation.

Perhaps start another conversation to post that code? Maybe another set of eyes is all you need.

There was no change that should affect speed in such a bad way. Also, I don’t see the slowdown myself. So - unfortunately - there is no code to show.