1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Resolved Bug Reports' started by Jon W, Aug 8, 2015.

Tags:
  1. Jon W

    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.
     
  2. Mike

    Mike XenForo Developer Staff Member

    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.
     
    Jon W likes this.
  3. Jon W

    Jon W Well-Known Member

    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?
     
  4. Mike

    Mike XenForo Developer Staff Member

    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.
     
    Jon W likes this.

Share This Page