I am currently trying to debug an attack for a boss character which is causing massive amounts of lag (specifically, RunJob and Sound are spanning multiple bars and ping raises to over 400ms during it). I’ve attempted to narrow down what’s causing the lag using the debug library to no success.
I am using profilebegin and profileend in my scripts to check the performance of certain segments of my code. My debug implementation looks roughly like this:
debug.profilebegin("BossAttack")
StartStuff(function ()
foo()
bar()
debug.profilebegin("StrongCauseForConcern")
baz()
debug.profileend()
qux()
end)
debug.profileend()
The result I’m getting in attempting to profile is this:
There’s no evidence that the debug library is client-side only and judging by the documentation, this should be legal. That being said, my profiles just will not show. Am I only able to accurately use this from the client? If so, how do I directly debug specific server-side performance problems?
None of the Developer Hub articles have been useful. They are either suggesting using the MicroProfiler which I can’t because of this problem or to use various analysis windows which I can’t because those measure overall stats and don’t allow me to log specific sections of code for performance. It’s really frustrating.