Profile code X2021-1.1

Hi , I have a Web standalone application I need to run the profile code I select in the menu and the Profiles tab or the Profile.txt file does not appear anywhere Version Xojo 2021 / 1.1For Windows 10 64 how to activate the User guide Framework I read and it does not work thanks for the advice

You have to wait till app quits properly.
e.g. close last tab in browser and wait a minute.

I also had difficulty using it on the new version…It doesn’t always close the app after 1 minute. If you try to terminate with App.quit on windows 10 it goes into event loop(<>)

can you explain it to me i don’t understand it

As Christian told you, after activating the “Profile Code” item in the Project menu, you should launch your app, do whatever you want to analyze and then close all browser tabs waiting for the webapp to finish correctly. Unfortunately it happens to me that it never closes even if I don’t have any browser tabs active. You can put a button in the app to force it to close as written in the documentation (“Alternatively you can add a button or action that calls the WebApplication.Quit method.”), but unfortunately due to a bug, the webapp goes into event loop and doesn’t close properly even then.

I have closed all browser bookmarks and even after 10 minutes the file will not be created. I added a button with the action app.quit the application does nothing. So what should the exit code look like?

There’s nothing you can do about it! It’s a bug. Sorry if I was unclear, I thought it was understood.


I struggled a bit to get it to work myself with Web 2 and Windows 10. The solution for me was:
Adding a button (or toolbar option in my case) which calls the code:

call app.Quit

Select “Profile Code” from the Project menu, and also deselect “Break on Exceptions” from the Project menu. By deselecting that, it seemed to ignore the event loop that happens on quit.

Run the project, “do stuff”, then press the button/toolbar to force quit the app. It should stop the code, and bring up the profile results in the IDE.

Hope this helps!

1 Like

so I managed to have a profile option in the left tree, but still no record. What can I do wrong? I tried all your advice and nothing.
The profile appears in xojo if I run the debugger and the compiled application is already running

Have you tried to do a profile on an empty desktop app? If that works, try an empty web app. If this also works then try your project again.

Oh, wow. Greg O’Lone has implemented my feature request: 64149 - Do profiling independently on how app quits . I hope that this will improve profiling.

This is wonderful news! :smiley:

The profile data for an empty desktop application is also empty

Do you have StartProfiling in App.Open?

Windows blocks the creation of the Profile exe file The application detects a virus after turning off Antivirus, the file created in it is only the following:
2021-05-19 19:30:47

With an empty project there is nothing to report. Try implementing an event or two and try again.

Hi Greg,
Project has 2 buttons .
I’m really unhappy with the application Web Standallone is running slowly I can’t find where it’s slowing down and today I dedicated a profile code which I couldn’t break up I really don’t know what to do with it.