How enable profiling? (SOLVED)

function on_reload(self)
    -- Toggle the visual profiler on hot reload.
    profiler.enable_ui(true)
end

Which file should I put this code in?

main.script ?

I would say in any file you like

2 Likes

I tried. nothing appears ((

Maybe i need to make some settings?

defold 1.4.7

The profile does not work in release builds.

Also, are you sure the line with profiler.enable_ui(true) is running? Do you have any errors in the console? In your example you put it in on_reload() which is called when you hot-reload a script. Are you doing that? Try putting it in init().

1 Like

Fantastic ))

Thanks a lot

I just used an example call from the documentation))

works fine from init()