Tuesday, January 15, 2013

Re: DebugKit behaviour



On Monday, January 14, 2013 3:37:18 PM UTC-5, AD7six wrote:


On Monday, 14 January 2013 20:28:31 UTC+1, McScreech wrote:
On Monday, January 14, 2013 11:12:05 AM UTC-5, McScreech wrote:
Hello, [ Apache 2.2.22 (Win32), MySQL 5.5.21, PHP 5.3.5, cakePHP 2.2.1 ]

I'm having odd (IMO) behaviour from DebugKit - the toolbar only shows up if there are errors on the page and NOT if it renders correctly.

Is this expected behavior? If so, how do I force the DebugKit toolbar to always display?

Not sure what version of DebugKit I am using, how do I check that I am using the correct one for cakePHP 2.2.1?

TIA, McS

Went back over the docs again and found 'forceEnable' option which I've included in AppController $components as follows.
However, I still don't understand why I need this to see the toolbar on a correctly rendered page?
'DebugKit.Toolbar' => array('forceEnable' => true)

Also, went back to the source (https://github.com/cakephp/debug_kit) and got the current version from the master branch, which also did not seem to help without the 'forceEnable' option.

McS



Somewhere in your app you have

    Configure::write('debug', 0);

Find it - and remove it.

AD 
 
Thanx Andy,

Found it. In in core.php I had Configure::write('debug', 0); and in AppController.php I had Configure::write('debug', 2); in the beforeFilter() function.

The line in AppController.php is the one I've been focussing on to switch into debug mode. Which leads me to another point of confusion for me. I had been working under the assumption (can't remember where I learned this) that I could override the debug=0 (global?) setting in the core with my own (local?) setting in the AppController. Apparently I am mistaken. :-( Perhaps I have carried over a cakePHP 1.x practice into cakePHP 2.x?

Ah well, guess it's a moot point now, eh?

Thanx guys, McS






--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: