As designed Adding XenForo_Application::defer to method stops ability to debug

Jon W

Well-known member
Not sure exactly why this happens and I don't think there is anywhere in XenForo core that this is noticeable, but if you add a call to run a deferred task to a page then it cause the debugger to stop running and you can no longer see how many database queries have been run, which queries, etc.
 
The deferred system intentionally disables MySQL query logging as it is fairly memory intensive (or at least looks like a memory leak) and many deferred tasks run large numbers of queries.

It's not the presence of the call in the page -- it's actually that the page runs it. If you need this, you can stop disabling the profiler in your task.
 
Is there any way that it could just pause the MySql query logging instead so that everything logged up to that point could still be output in the browser?
 
You could probably change the call to disable the profiler if you preferred, though in that case what is output is basically "wrong", so I don't think it's something we'd change.
 
Back
Top Bottom