Git Product home page Git Product logo

debug_kit's Introduction

CakePHP DebugKit

Build Status Coverage Status License Total Downloads

DebugKit provides a debugging toolbar and enhanced debugging tools for CakePHP applications. It lets you quickly see configuration data, log messages, SQL queries, and timing data for your application.

⚠️ DebugKit is only intended for use in single-user local development environments. You should avoid using DebugKit in shared development environments, staging environments, or any environment where you need to keep configuration data and environment variables hidden. ⚠️

Requirements

  • SQLite (pdo_sqlite) or another database driver that CakePHP can talk to. By default DebugKit will use SQLite, if you need to use a different database see the Database Configuration section in the documentation linked below.

For details and older versions see version map.

Installation

  • Install the plugin with Composer from your CakePHP Project's ROOT directory (where the composer.json file is located)
php composer.phar require --dev cakephp/debug_kit:"^5.0"
// src/Application.php
$this->addPlugin('DebugKit');
  • Set 'debug' => true, in config/app.php.

Is DebugKit not working?

If you don't see a CakePHP icon on the bottom right of your page DebugKit is not be working correctly. Some common problems are:

  1. Your PHP environment doesn't have SQLite installed. Check your application logs to confirm if this happening. You can either configure DebugKit to use a different database, or install the PDO SQLite 3 extension.
  2. Your hostname needs to be added to the DebugKit.safeTld. If your local domain isn't a known development environment name, DebugKit will disable itself to protect a potentially non-development environment.
  3. If you are using the Authorization Plugin you need to set DebugKit.ignoreAuthorization to true in your config.

Reporting Issues

If you have a problem with DebugKit please open an issue on GitHub.

Contributing

If you'd like to contribute to DebugKit, check out the roadmap for any planned features. You can fork the project, add features, and send pull requests or open issues.

Documentation

Documentation for DebugKit can be found in the CakePHP documentation.

Panels

Panels by other plugins:

  • L10n by Setup plugin to show current localization for Date, DateTime, Time objects/values.

debug_kit's People

Contributors

admad avatar allanmcarvalho avatar andrej-griniuk avatar antograssiot avatar bcrowe avatar cake17 avatar ceeram avatar dereuromark avatar erwane avatar garas avatar graziel avatar h4ck3rm1k3 avatar ichikaway avatar jeremyharris avatar joelmoss avatar josegonzalez avatar jperras avatar kamui545 avatar lordsimal avatar lorenzo avatar markstory avatar othercorey avatar raul338 avatar ravage84 avatar renan avatar saeideng avatar stickler-ci avatar tersmitten avatar wa0x6e avatar x0bandeira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

debug_kit's Issues

Could not load class DebugKitLogListenerLog

Hi,

I cant get Debug to work, I'm using Netbeans and the URL_rewrite is active.

I've read all over the place but I never saw this message...
Could not load class DebugKitLogListenerLog

Stack Trace
CORE\Cake\Log\LogEngineCollection.php line 40 → LogEngineCollection::_getLogger(string)
CORE\Cake\Log\CakeLog.php line 198 → LogEngineCollection->load(string, array)
APP\Plugin\DebugKit\Lib\Panel\LogPanel.php line 27 → CakeLog::config(string, array)
APP\Plugin\DebugKit\Controller\Component\ToolbarComponent.php line 433 → LogPanel->__construct(array)
APP\Plugin\DebugKit\Controller\Component\ToolbarComponent.php line 164 → ToolbarComponent->_loadPanels(array, array)
CORE\Cake\Controller\ComponentCollection.php line 116 → ToolbarComponent->__construct(ComponentCollection, array)
CORE\Cake\Controller\ComponentCollection.php line 53 → ComponentCollection->load(string, array)
CORE\Cake\Controller\Controller.php line 643 → ComponentCollection->init(PagesController)
CORE\Cake\Routing\Dispatcher.php line 181 → Controller->constructClasses()
CORE\Cake\Routing\Dispatcher.php line 160 → Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)
APP\webroot\index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse)

Thank for you help !

Debug trace in log file

Created by Roman, 18th Jan 2012. (originally Lighthouse ticket #87):


it would be very helpfull especialy if you are using REST services or you have some problem on production servers and you can not switch on debug on the view to redirect all debug information (Configure::read('debug') > 0) into some log file (the best into debug.log).

DebugKit kills Jquery on site when enabled

So I have finally got around to upgrading to 2.4.3 today, Have been using DebugKit without problems on 2.3.1 for a year now! So I uninstalled DebugKit - upgraded to 2.4.3 and re-installed the latest Debugkit from here - now I get a whole load of:

Uncaught TypeError: Property '$' of object [object Object] is not a function

In Chrome console when viewing any page on my site that has JQuery on it and all Jquery stops working on the page, if I disable DebugKit everything is ok again.

I'm also running asset_compress which has jquery 1.9.1 in it - could this be anything to do with it?

Any hints?

RFC: History Panel should "work" even with caching disabled in app

Created by ADmad, 9th Dec 2011. (originally Lighthouse ticket #85):


During development there are many times when one disables cache to check things (or simply keep it disabled while developing). But with cache disabled ToolbarComponent::_createCacheConfig() bails out on creating the cache config needed for saving the history entries. It would be nice if we could have the history feature functional even with caching disabled in app config.

SQL Log not displaying history results for redirected pages.

Created by thatcode, 3rd Sep 2010. (originally Lighthouse ticket #31):


Hi.

I've tried to debug this and failed - tbh, I don't see why I don't always get this error...

When I use the history panel to display previous requests, and select a redirected request (I was trying to view a login request) I get an error: Undefined index: default [CORE/plugins/debug_kit/views/elements/sql_log_panel.ctp, line 36]

From the traces given (and added debugs):
$content = array(
"connections" => array(
"default" => true
),
"threshold" => 20
);

This is the same as in non-redirected requests - yet only throws an error on redirected requests.

CakePHP 1.3.3
Debug Kit 5db6ec7
PHP 5.3.2

Thatcode

DebugKit and Cakephp 3.0.0.dev3 branch

Fatal Error
Error: Class 'App' not found
File /home/piyush/cakephp-test/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php
Line: 16

Notice: If you want to customize this error message, create App/Template/Error/fatal_error.ctp

Is DebugKit compatible with Cakephp 3 ??

history_state view output mangled

Created by Vanja D, 7th Feb 2013. (originally Lighthouse ticket #115):


While using History tab, I am constantly getting "History retrieval failed" alert.

The XHR response of the request /debug_kit/toolbar_access/history_state/1 outputs (repeatedly):

Notice (8): Undefined index: elementName [APP/Plugin/DebugKit/View/ToolbarAccess/history_state.ctp, line 24]
Notice (8): Undefined index: content [APP/Plugin/DebugKit/View/ToolbarAccess/history_state.ctp, line 25]
Notice (8): Undefined index: plugin [APP/Plugin/DebugKit/View/ToolbarAccess/history_state.ctp, line 27]

I changed the code in View/ToolbarAccess/history_state.ctp to:

foreach ($toolbarState as $panelName => $panel) {
       + if (empty($panel) || empty($panel['elementName'])) continue;
       ...
}

Now the request returns:

{ 
  "environment" : "<h2>App Constants</h2>...",
  "include" : "<h2> Included Files</h2>...",
  "log" : "<h2>Logs</h2>...",
  "request" : "<h2> Request</h2>...",
  "session" : "<h2>Session</h2>...",
  "sqllog" : "<h2>Sql Logs</h2>...",
  "timer" : "...",
  "variables" : "<h2> View Variables</h2>..."
}

This is my first time using DebugKit, so I might be doing something wrong.

HOW TO REPEAT

Just cloned master from github, loaded it in bootstrap and also tried adding "'DebugKit.Toolbar' => array( 'history' => 8)" to the $components var to see if it was at all enabled.

DebugKit toolbar for cakePHP wasn't installed properly

Created by Choudhury Saadmaan Mahmid, 2nd Sep 2013. (originally Lighthouse ticket #132):


I tried to install DebugKit for cakePHP and here's how I did it: first of all I downloaded a zip file of the debug_master_kit from github, then I created a folder named DebugKit in app\Plugin directory. Then I set debug mode to 1 in core.php file in app\Config directory. Next, I added CakePlugin::load('DebugKit') in the bootstrap.php file in app\Config directory. Finally, I edited the AppController.php file in app\Controller directory. But there was error. The error screenshot is attached here. I expected to see a change in the changelog of cakePHP saying DebugKit is installed. What should I do now?

Ajax and Debugger Kit

Created by Sam, 17th May 2013. (originally Lighthouse ticket #125):


Hi,

I am trying to use the debugger kit on an application (running correctly) but it always shows as "Request" in the DebuggerKit , for section Cake Params:

  pass(empty)
  named(empty)
  controller: home
  plugin(null)
  action: index
  form(empty)
  url

So I have for controller and action always the pair (home,index).
So I investigated and that seems to be because I have a javascript menu which uses AJAX request this way:

new Ajax.Updater('working_zone','components/consult', [...])

which calls method consult of the components controller and display the render of the controller in :

<div id="working_zone"></div>

Is there a way to deal with this way of calling the controllers so that the DebuggerKit can "catch" the requests ?

_I am using Cake 1.2 with associated DebuggerKit with mod_rewrite disabled_

Thanks,

Sam.

DebugKit doesn't close when render() is called twice

Created by Tomas Maly, 20th Mar 2011. (originally Lighthouse ticket #43):


DebugKit loads but doesn't shut it's bar when I call render("index", false) manually inside my view. (I know I should be using elements) It otherwise loads properly but views/debug.php::render() should not attempt to load the JS file when there's no layout attached to the render()

views/debug.php, line 91:

            if (empty($this->params['requested']) && isset($this->loaded['toolbar'])) {

should be:

            if (empty($this->params['requested']) && isset($this->loaded['toolbar']) && $layout !== false) {

Apparently when it tries to append the JS file to $scripts_for_layout (via $this->Html->script($file)), script() doesnt load it a second time when render() is called with the default layout (thinking it was already loaded). DebugKit otherwise works but the bar sticks open and won't close.

I'm probably taking risks in general by calling $this->render() within my view itself (I'll definitely move away from that and towards requestAction() or element()), but still would think that the debugkit rendering should protect itself from invalid calls (as it does with $this->params['requested'])

Parse error: syntax error, unexpected T_FUNCTION in ToolBarComponent

I have tried to install DebugKit on two separate sites and I have had the same problem both times.

Below is the exact error:
Parse error: syntax error, unexpected T_FUNCTION in /home2/regentsr/public_html/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php on line 179

My PHP version is: 5.4.24
Cake version 2.4.4 (downloaded 30 minutes ago)
DebugKit downloaded from: https://github.com/cakephp/debug_kit as a zip file 15 minutes ago.

I have done a fresh install of Cake. The first this I have done is to install DebugKit. I followed the instructions to install as best I can tell exactly from the same DebugKit download site. the only things I have changed are (as according to installation instructions):

bootstrap
appcontroller
core
default

I thought I would not get this error since everything is entirely downloaded just now. Any ideas? Do you need me to put any additional code here?

Thank you very much.

Error: ToolbarComponent could not be found. Error: Create the class ToolbarComponent below in file: app/Controller/Component/ToolbarComponent.php

Hi. Perplexed by this error. PHP 5.3.3 and Cake 2.2.3.

Here's the full error:

Missing Component
Error: ToolbarComponent could not be found.
Error: Create the class ToolbarComponent below in file: app/Controller/Component/ToolbarComponent.php
<?php 
class ToolbarComponent extends Component {
}
Notice: If you want to customize this error message, create app/View/Errors/missing_component.ctp
Stack Trace
#0 /Applications/MAMP/htdocs/kuratur-120813/lib/Cake/Controller/ComponentCollection.php(51): ComponentCollection->load('DebugKit.Toolba...', Array)
#1 /Applications/MAMP/htdocs/kuratur-120813/lib/Cake/Controller/Controller.php(585): ComponentCollection->init(Object(UsersController))
#2 /Applications/MAMP/htdocs/kuratur-120813/lib/Cake/Routing/Dispatcher.php(100): Controller->constructClasses()
#3 /Applications/MAMP/htdocs/kuratur-120813/lib/Cake/Routing/Dispatcher.php(86): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#4 /Applications/MAMP/htdocs/kuratur-120813/app/webroot/index.php(98): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#5 {main}

What I did:
Unzipped the debug_kit-master.zip into Plugin/DebugKit.

bootstrap.php - uncommented CakePlugin::load('DebugKit');

core.php - Configure::write('debug',1 );

composer.json looks like this - but I also got the error when not including the "cake/php/debug_kit": 2.2.*" line:

"require": {
        "php": ">=5.3.0",
        "composer/installers": "*",
        "cakephp/debug_kit": "2.2.*"
    }

The ToolbarComponent.php file with DebugKit contains this:

class ToolbarComponent extends Component implements CakeEventListener {

So, it doesn't seem like I should add class ToolbarComponent extends Component { to that?

I made a copy of ToolbarComponent.php from the plugin files and added it to app/Controller/Component/ (per the error), but still get the exact same error.

Appreciate any help. Thanks!

DebugKit Toolbar : #</body># matching pattern / last occurence

Created by Alpha33fr, 15th Dec 2012. (originally Lighthouse ticket #113):


DebugKit.Toolbar loads itself before the matching closing tag </body>.

// HtmlToolbarHelper.php:161
...
    if (preg_match('#</body>#', $view->output)) {
        $view->output = preg_replace('#</body>#', $toolbar . "\n</body>", $view->output, 1);
    }
...

But what happens when our view output contains </body> ?

For example (inline javascript) :

<?php $this->append('script'); ?>
<script>
    var w = window.open();
        w.write('<html><head></head><body>Hello !</body></html>');
</script>
<?php $this->end(); ?>

Output will be altered at the wrong place...
I didn't find any other examples.
I think closing tag must be the LAST FOUND to solve this problem.

Let me know.

SQL syntax highlight for SQL log panel

Created by Predominant, 12th Dec 2009. (originally Lighthouse ticket #4):


(Reported by: ichikaway)

Hello.
I make SQL syntax highlight for SQL log panel. It's convenient to see SQL query.
I use GeSHi for syntax highlight.

(Source code diff)[http://thechaw.com/forks/ichikaway/debug_kit/commits/view/16e48f39ce72d6b09a3854ec878c5b69e1529daa]

Screenshot is attached.

thanks.

Missing Component

Error: DebugKit.ToolbarComponent could not be found.

Error: Create the class ToolbarComponent below in file: D:\AppServ\www\cakephp\app\Plugin\DebugKit\Controller\Component\ToolbarComponent.php

Fatal error: Function name must be a string in ToolbarComponent.php on line 192

Hey guys, so here's what I got going on. This server has no other installations of cakephp. This is a fresh install.

Installed cakephp,
Followed the installation in the readme.
I've even checked that the $prefix in core.php is uniqu by changing it.

When I browse to the app I get this:

Fatal error: Function name must be a string in /home/allthedu/public_html/allthedurbin.com/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php on line 192

Fatal error: Function name must be a string in /home/allthedu/public_html/allthedurbin.com/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php on line 192

Error in tab timer

Hello guys, I'm having problems in timer tab, the following error is occurring:

Warning (512): Method NumberHelper::toReadableSize does not exist [CORE\Cake\View\Helper.php, line 192]

Warning (512): Method NumberHelper::precision does not exist [CORE\Cake\View\Helper.php, line 192]

The NumberHelper being loaded from my application, I believe it should be the Core of Cake. Sorry for my english. Thank you!

Sql Log "explain" link hashing problem

When clicking on the explain link, the hash generated and sent in the post request does not match the generated hash on the sql_explain controller action and causing it to fail with a Invalid parameters exception every time the "explain" link is clicked. Have not been able to track down the root of the problem yet.

Activating Toolbar Component Causes Segmentation Fault Or NotFoundException

Since CakePHP 2.4.3, adding the DebugKit.Toolbar component to a controller in my dev environment produces a PHP segmentation fault (as logged in /var/log/apache2/error.log) and a connection reset on the client (Firefox), unless CakePHP debug level is set to 0 (i.e. Configure::write('debug', 0) in app/Config/core.php), in which case the script doesn't crash and CakePHP returns the following flash message: "Error: The requested address '/my/project/webroot/' was not found on this server." along with some more details in app/tmp/logs/error.log:

2014-01-02 10:38:05 Error: [NotFoundException] Not Found
Request URL: /my/project/webroot/
Stack Trace:
#0 /base/path/to/project/lib/Cake/View/View.php(929): include()
#1 /base/path/to/project/lib/Cake/View/View.php(891): View->_evaluate('/base/path...', Array)
#2 /base/path/to/project/lib/Cake/View/View.php(460): View->_render('/base/path...')
#3 /base/path/to/project/lib/Cake/Controller/Controller.php(952): View->render('home', NULL)
#4 /base/path/to/project/app/Controller/PagesController.php(68): Controller->render('home')
#5 [internal function]: PagesController->display('home')
#6 /base/path/to/project/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(PagesController), Array)
#7 /base/path/to/project/lib/Cake/Routing/Dispatcher.php(185): Controller->invokeAction(Object(CakeRequest))
#8 /base/path/to/project/lib/Cake/Routing/Dispatcher.php(160): Dispatcher->_invoke(Object(PagesController), Object(CakeRequest), Object(CakeResponse))
#9 /base/path/to/project/app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#10 {main}

Loading the plug-in without adding the component to a controller works just fine, no errors. I'm using PHP 5.3.10 and a bare, fresh install of CakePHP 2.4.3 and DebugKit 2.2.2. Any idea how to debug this?

debug kit display error in firefox

debug-kit-chrome
debug-kit-firefox

I'm unable to find the error an solve it. Debug kit works fine in chrome but in Firefox it shows error and its toolbar is not working.
I've followed all the installation procedures given. And it working properly in chrome does suggest that there is not any error.

Session resets on refresh when Session.save is set to 'cache'

Created by Kim Biesbjerg, 19th Jan 2010. (originally Lighthouse ticket #17):


Session resets on refresh when Session.save is set to 'cache'. This is also an issue on Cake 1.2.

core.php:

Configure::write('Session.save', 'cache');
//Configure::write('Session.table', 'cake_sessions');
Configure::write('Session.cookie', 'CAKEPHP');
Configure::write('Session.timeout', '120');
Configure::write('Session.start', true);
Configure::write('Session.checkAgent', false);
Configure::write('Security.level', 'low');
$cacheOptions = array('engine' => 'Apc', 'prefix' => Inflector::slug($_SERVER['HTTP_HOST']));
Cache::config('default', $cacheOptions);

I have Session added to the AppController's components and helpers array.

If I write to the session from the controller, refresh the page, and check the session - it's empty.

It also happens if Cache engine is File or Memcache.

CRUD / Memory Exhaust

When using latest Cake (2.4.4) and latest Debug Kit (Master), I get this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /var/www/atman/app/Plugin/DebugKit/View/Helper/HtmlToolbarHelper.php on line 94

Details of my configuration: http://bin.cakephp.org/saved/113376

When using DebugKit 2.2.1 - I get no error.

I get an error with my debug_kit

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /var/www/cake/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php on line 497

what's the meaning of this and what can i do???please!

DebugKit 2.0, urlencode warning on related named variables in pagination

Created by Matt, 3rd Nov 2011. (originally Lighthouse ticket #78):


DebugKit is generating a warning when paginating data with named parameters from related models.

Warning (2): urlencode() expects parameter 1 to be string, array given [ROOT\plugins\DebugKit\Controller\Component\ToolbarComponent.php, line 484

This is the code that causes the warning:

                if (!empty($query)) {
                    $title .= '?';
                    foreach ($query as $key => $value) {
                        $query[$key] = $key . '=' . urlencode($value);
                    }
                    $title .= implode('&', $query);
                }

And this is the value of $query that it is trying to use

2011-11-03 09:50:01 Error: Array
(
    [/events/index/page:3/Uk3] => Array
        (
            [code] => 
        )

)

Example: I have a table 'events' that has a column 'uk3_id' to another table 'uk3' with columns 'id' and 'code'. I am filtering the data by the code value of 'BOARD' and placed it in the named array which is then loaded into the 'url' of the paginator options.

From log file, this is the value of params array before doing the pagination.

2011-11-03 09:34:23 Error: params=Array
(
    [plugin] => 
    [controller] => events
    [action] => index
    [named] => Array
        (
            [Uk3] => Array
                (
                    [code] => BOARD
                )

            [page] => 2
        )

    [pass] => Array
        (
        )

    [isAjax] => 
)

In order to make pagination work I create a conditions array like this

2011-11-03 09:49:59 Error: paginate conditions=Array
(
    [Uk3.code] => BOARD
)

And then in the view

$this->Paginator->options(array(
    'url' => $this->request->params['named'],
));

The paginator then creates links like this for page 1,2,etc..

http://localhost/warehouse/events/index/page:3/Uk3[code]:BOARD

And when clicking on that link not the first time, but the second time, DebugKit throws the warning.
I was thinking the paginator url might need to be like this instead:

http://localhost/warehouse/events/index/page:3/Uk3.code:BOARD

but the 2.0 Book says the other format is allowed (Routing section)

The above would generate the url /posts/index/filter[published]:1/filter[frontpage]:1. The parameters are then parsed and stored in your controller’s passedArgs variable as an array, just as you sent them to Router::url:

Javascript as jQuery plugin

Created by Kamisama, 22nd Aug 2012. (originally Lighthouse ticket #102):


There's some javascript code in the history_panel.ctp and sqllog_panel.ctp.

Isn't it better to put them all in js_debug_toolbar.js, and convert the javascript code into a jquery plugin ? That way, it would be compatible with AMD.

Make toolbar relevant timer bars light grey

It would be nice if timer bars, that are caused by the toolbar itself, would show up as "light green", so are not as visible as the rest of the bars.

E.g. "processing toolbar data"

timer

If that can be decided - which I think it can.

Add option to use ChromePHP instead of FirePHP in DebugKit

Created by Chris Cinelli, 1st Aug 2011. (originally Lighthouse ticket #62):


FirePHP extension for Firebug seems not to work anymore in Firebug 1.8. The author of FirePHP seems to go for the not-free route with the DeveloperCompanion (new FirePHP client side).
Someone implemented an extension for Google Chrome that is similar to FirePHP but the protocol is not 100% compatible. It would be good to just use chrome as developer environment.
Please add support for it.

Extra: It would be nice to to be able to switch between ChromePHP and FirePHP. Even better CakePHP could autoselect if using one or the other based on user agent value.

For more info on ChromePHP see https://chrome.google.com/webstore/detail/noaneddfkdjfnfdakjjmocngnfkfehhd?hl=en-US

Synchronous XMLHttpRequest on the main thread is deprecated

I'm getting a warning in firefox (in fact, it is Iceweasel 32.0a2):

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/

The problem (if it is) seems to be in js_debug_toolbar.js, line 71:

req.open('get', window.DEBUGKIT_JQUERY_URL, false);

ToolbarHelperTestCase not passing tests

CakePHP 2.4.5
Fresh download of debug_kit

FAILED
Failed asserting that false is true.
Test case: ToolbarHelperTestCase(testGetQueryLogs)

/app/Plugin/DebugKit/Test/Case/View/Helper/ToolbarHelperTest.php : 156

ToolbarHelperTestCase::testGetQueryLogs
5/5 test methods complete: 4 passes, 1 fails, 12 assertions and 0 exceptions.

line 156 is

$this->assertTrue(isset($result['queries'][0]['actions']));

on var_dumping $result, this is its contents:

array(3) { ["queries"]=> array(0) { } ["count"]=> int(0) ["time"]=> NULL }

Also, when line 156 is commented out, line 164 gives a notice: undefined offset. Line 164 contains

$this->assertEquals($cached[$model->useDbConfig]['queries'][0], $result['queries'][0]);

Hope this helps!

Cake wont remove cake:nocache tags if Debugkit is loaded

Created by Ber Clausen, 16th Nov 2010. (originally Lighthouse ticket #34):


I know cake:nocache tags removal is relaxed now.

It works by loading Cache helper

public $helpers = array(
  'Cache',
}

or enabling 'Cache.check'

Configure::write('Cache.check',true);

But when you load DebugKit

public $components = array(
  'DebugKit.Toolbar'
}
<cake:nocache> </cake:nocache>

tags are not removed.

Composer install succeeds but does not install the toolkit

I attempted to follow the Composer installation instructions this morning. composer install ran without errors, but the plugin was not installed to app/Plugin.

Environment info:

  • Vagrant VM built from puphpet
  • box: puphpet/debian75-x64
  • Cake version: 2.4.3

PHP version:

$ php -v
PHP 5.5.12-1~dotdeb.1 (cli) (built: May  6 2014 03:56:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

Composer version:

$ composer --version
Composer version 71397f82e4bdf4722bcbfeb43be0d30831376d3d 2014-06-04 12:20:36

composer.json:

{
    "require": {
        "cakephp/debug_kit": "2.2.*"
    }
}

Installation results:

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing composer/installers (v1.0.13)
    Loading from cache

  - Installing cakephp/debug_kit (2.2.3)
    Loading from cache

Writing lock file
Generating autoload files

Missing DebugKit:

$ ls -l /var/www/app/Plugin/
total 0
-rwxrw-r-- 1 www-data www-data   0 Nov 25  2013 empty*

I was able to get the plugin installed by following the git submodule instructions, but I would much prefer to use Composer.

DebugKit Requires PHP 5.3

The current version of Cake requires PHP 5.2.8 but the default debug tool requires PHP 5.3 which basically makes the required version PHP for Cake 5.3 also. Why did you do this?! Is there a way to make DebugKit work in php 5.2.8? Or is there an alternative debugging tool?

When memcache handles sessions, history panel prevents loading

Created by WBP-Tomh, 15th Apr 2013. (originally Lighthouse ticket #120):


When using Memcache for sessions and using file or Memcache for Debug Kit, the history panel prevents the app from fully loading. Setting the component 'DebugKit.Toolbar' => array('panels' =>array('history'=>false))) allows the app to load.

Could this be caused by the engine being set to FILE on line 376 of debug_kit/Controller/Component/ToolbarComponent.php?

History state requests fail

Working with master, when trying to load history state I'm getting the "History retrieval" error. It's caused because of Cake trying to load the history_state.ctp view from View/ToolbarAccess/json folder, when it's located in View/ToolbarAccess folder. RequestHandler is properly marking the request as "json". Might I be missing any configuration?

Missing log file

I am not sure if it is a bug or it was intended to be this way but when I try to write into a log file that is not configured in the bootstrap.php then no record is created. For example: $this->log("i am not logged to file", "test_log");. But it is logged if the debug kit is turned off or when the debug level is 0. Quite annoying.

Though the log records are always displayed in the debug kit log panel.

Config language set by debug kit

Created by teeman, 18th Feb 2011. (originally Lighthouse ticket #41):


In my beforeFilter method in the AppController, Config.language is already set.

Consider the following code:

function  beforeFilter() {
    debug(Configure::read('Config'));

above line gives with debug kit turned on (it's in the components array)
app/app_controller.php (line 32)

Array
(
[language] => nl
)

With debugkit removed from the components array
app/app_controller.php (line 32)

This is due to the use of __d() translation functions used in ToolbarComponent::initialize.. It automatically sets the Config.language

For debugging l10n stuff etc, it would be nice that it leave Config.language intact

PS it's the debug kit for the 1.3 version

DebugKit not working Cake 2.4.1

Created by Daniel Cortes, 27th Sep 2013. (originally Lighthouse ticket #135):


I've been trying to install DebugKit and I can't get it to work. I've followed all the instructions provided by DebugKit in ther github repository. Here are the steps I followed:

  1. Install CakePHP and check installation.
  2. Download the latest DebugKit 2.2.1 which is compatible with Cake 2.4
  3. Copy the contents to the cake/plugins/DebugKit folder.
  4. Called CakePlugin::load('DebugKit'); in app/Config/bootstrap.php
  5. Included toolbar component by calling public $components = array('DebugKit.Toolbar'); within the class of AppController.php
  6. Set Configure::write('debug', 1); in app/Config/core.php
  7. Removed the 'sql_dump' element from my layout in app/View/Layouts/default.ctp

After doing all that I got the following errors:

Error: The application is trying to load a file from the DebugKit plugin

Error: Make sure your plugin DebugKit is in the app\Plugin directory and was loaded

What I have tried:

  1. Not removing sql_dump element.
  2. I made sure that the plugin call matches the DebugKit folder name.
  3. Follow the instructions of this forum and others that solved the exact error but with earlier versions of both cake and debugkit.
  4. Made a fresh reinstall of both Cake and DebugKit.

And still haven't solved the problem. BTW, I'm new to CakePHP so if I'm missing anything too obvious I apologize.

Here is an image that shows the structure of my project (it says Cake_2_0 but that's just the name of the folder, I'm using Cake 2.4.1), I'm using XAMPP as my server. Thanks,

Daniel

Bug when using with Croogo ?

Hello, I just installed DebugKit in a Croogo1.5.5 (a powerful cakephp cms, as you might know ;-)

It works great, but it appears also to non-logged-in visitors, what I find quite dangerous...

Is it a normal behaviour or is it specific to being used within Croogo ?
Is there a way to make it appear only to administrators ?

Thanks in advance !

DvDbrln

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.