Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Profiler
#1

[eluser]albertleao[/eluser]
Hey all!

I recently came across a codeigniter plugin which allows you to have the profiler print it's information in a new window popup. Does anyone know where I can find this?
#2

[eluser]Ckirk[/eluser]
Do you mean Debug Toolbar?
#3

[eluser]anis2505[/eluser]
What about CI built-in profiler

http://ellislab.com/codeigniter/user-gui...iling.html
#4

[eluser]albertleao[/eluser]
[quote author="anis2505" date="1371999845"]What about CI built-in profiler

http://ellislab.com/codeigniter/user-gui...iling.html[/quote]

I was looking for the one that comes in a javascript popup.
#5

[eluser]Ckirk[/eluser]
debug toolbar does exactly that
#6

[eluser]albertleao[/eluser]
[quote author="Ckirk" date="1372026210"]debug toolbar does exactly that[/quote]

Yes, Thank you very much. Just installed it. Is there a way to enable it globally though in all controllers?

I have autoloaded the spark, but want to have profiler_enabled in all controller functions. Any ideas?
#7

[eluser]Ckirk[/eluser]
sure. If you haven't already create a MY_Controller in your "core" folder and have all your controller extend that instead of CI_Controller.

Then initialise the profiler in your MY_Controller __contruct()
#8

[eluser]dragonfly41[/eluser]
As a recent user of codeigniter I've just subscribed to this forum .. this is my first post .. and I wanted to discuss Profiler. So this thread seems pertinent to tag onto.

Firstly Profiler seems to override XDebug which I've setup in php.ini.

I see very sparse error messages using Profiler.

e.g. a recent error message ...
An Error Was Encountered
Unable to load the requested class: <name of class>


but this message gives little clue as to the location of the error.

So I disabled Profiler in controller and XDebug now kicks in and gives a better view of the call stack and importantly the line of code where the error occurs.

My question is .. what does Profiler offer which is not offered by XDebug?

http://xdebug.org/
#9

[eluser]albertleao[/eluser]
[quote author="Ckirk" date="1372031394"]sure. If you haven't already create a MY_Controller in your "core" folder and have all your controller extend that instead of CI_Controller.

Then initialise the profiler in your MY_Controller __contruct()[/quote]


Hey! Thank you for the help. I tried the above and it did not work:

Code:
&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller {
        public function __construct() {
                parent::__construct();
        }
}

class Loggedin_Controller extends MY_Controller {
        public function __construct() {
                parent::__construct();
                if(!$this->user_model->authenticate_session()){
                        redirect("/");
                }
                else {
                        $this->output->enable_profiler(true);
                }
        }
}
?&gt;

If I put the "$this->output->enable_profiler(true);" in the controller function directly, it works! The controllers I'm using are extending the "Loggedin_controller" and my authentication method is working fine.




Theme © iAndrew 2016 - Forum software by © MyBB