I'm using Tracy 0.13.1 from vcpkg; on https://github.com/CorsixTH/CorsixTH
I found that if I enable the on-demand feature then even though I registered the LuaHook the lua functions do not show up in the Tracy gui even though the LuaHook function is being called.
if ( zoneCnt != 0 && !GetLuaZoneState().active ) return; returns non-zero and exits based on my debugging.
I suspect what is happening is that CorsixTH runs almost entirely within a co-routine, and even when running the Tracy gui before the program starts, the initial coroutine zone starts before the debugger is ready which causes it to discard every further zone.
Maybe it would be better to keep the current stack zone stack until the profiler is connected?