Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Enable profiling dinamically
  • Hey guys,
    is it possibile enable profiling dinamically?? I've tried to use \Config::set('profiling', true); in before() method into my controllers but it doesn't work
  • Currently that is not possible that way, the profiler is setup when the Fuel class init's. If you want to do it manually, this is what happens there:
    static::$profiling = \Config::get('profiling', false);
    
    if (static::$profiling)
    {
     \Profiler::init();
     \Profiler::mark(__METHOD__.' Start');
    }
    
  • ok! thank you!!
  • When you do this, you only need to call the init() method. The mark() is to profile the execution of the Fuel init process. And you must set \Fuel::$profiling = TRUE, to make sure the profiler output is generated when the request is processed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion