Code Monkey home page Code Monkey logo

silverstripe-debugbar's Issues

Show the result of a key

Using "click to see fields", (besides it could be a tiny bit more nicely formatted :P ), it would be awesome if it showed the results of the query in the table?
At least, when it's a limit 1 query?

PHP 7.2 upgrade

Is there any plans to make this compatible with 7.2. I notice there is a Object extends in DebugBar.php. Would this be the only amend to get it working with 7.2??

Remove CSS file widget.css

I've noticed the widget.css file was added back. We removed it previously because it was overriding the core package and moved everything to our own extension stylesheet. javascript/sqlqueries/widget.css

Commit

[BUG] silverstripe-cache dir is missing

[Emergency] Uncaught UnexpectedValueException: DirectoryIterator::__construct(/srv/dist/web/silverstripe-cache/www-data/debugbar/): failed to open dir: No such file or directory
GET /?flushtoken=4bcb6cc6cb95cdc471d385737ce2aca5&flush=
Line 113 in /srv/dist/web/vendor/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php

Destroying the session causes an error

When logging out, or just manually destroying the session, the SilverStripeCollector attempts to loop over a null result of getting the session, causing a Warning to be thrown.

screenshot_2018-10-24 get

Stable release

The master branch of this module supports SS4 but there's no tagged release. Any idea when this will happen?

Add ability to show when a template cache was hit/missed

It’s often hard to tell from the outside if you’re writing an effective cache key. You can guess if e.g. a partial template cache applies by looking at the overall page load time, but that’s not very accurate. Or you can set a breakpoint in the logic that should be cached, which in reality is too much of a barrier and gets easily missed. If the toolbar told you “Your partial cache named ‘myCacheKey’ didn’t find any existing caches”, it’s much clearer

Deprecate/remove DebugBarDatabaseProxy

For feedback

DebugBarDatabaseProxy is SS 3.1 compatible, and DebugBarDatabaseNewProxy is SS 3.2+ compatible. It might be a good idea to set the minimum version requirement for this module to 3.2, deprecate the DebugBarDatabaseProxy class in the 0.x release line and remove it in 1.0.x to reduce duplication and maintenance burden.

I'm sure that there are still plenty of users on 3.1, but it's been EOL for some time now (current minimum supported version is 3.5).

Memory leak in 1.0.0

I've identified that somewhere between v1.0.0-beta1 and v1.0.0, a regression has been introduced which results in severe memory leakage during long-running processes - particularly visible in my case during large unit test runs.

Unfortunately I don't have a deep understanding of the module's underpinnings, so I can't give any further detail on what is causing the issue. Should be able to reproduce this by running a large volume of DB queries on a CLI process and observing the difference in memory usage between 1.0.0-beta1 and 1.0.0.

Strict Notice with SS3.5.0

I got this after updating from SS 3.4.1 to 3.5:

[Strict Notice] Declaration of DebugBarDatabaseNewProxy::benchmarkQuery() should be compatible with SS_Database::benchmarkQuery($sql, $callback, $parameters = Array)

How to show this bar?

I am confused about the usage of this module. After install it via composer, it didn't show up automatically, even when request with "debug" and "debug_request".

Is there any step I need go through to make this module work? Maybe I need to change some configurations?

Remove NullHandler and only handle logs up to and including warning

The assumption that we can handle and log error levels and above and have them not halt page execution is incorrect with PSR-3.

The currently NullHandler override of the core logger ends up producing a white screen whenever errors are thrown.

We need to remove the handler and handling for log messages with those levels.

Show only duplicate queries

Although it highlights which queries are apparently duplicates, it would be nice to filter them by "duplicate only" and grouped by statement, to see where there could be some optimisations.

Capture and incorporate ?debug and ?debug_request

It would be nice if the Request-tab would include the output from ?debug and ?debug_request url variables.
I understand that this is not very easy to incorporate, but I think it would add a lot of value.

Separate core php-debugbar assets from customisations

To make way for pre-processed assets (e.g. #53).

Currently the assets/debugbar.css for example has some customisations. We should use a location that is obvious that it's a third party file that shouldn't be touched.

Acceptance criteria

  • Latest version of php-debugbar's assets are copied through to assets/vendor/php-debugbar
  • Customisations to assets/debugbar.css as well as the other CSS and Javascript files in that folder are moved to a new folder (e.g. css/)
  • Documentation makes it easy for devs to find out which files to change when contributing

No tests

Tests are missing. I think adding either Behat or Unit tests would be a good thing to make sure everything stays stable.

[IMPROVEMENT] Display cached variables

It would be awesome to display cached variables: name, value, ttl

use SilverStripe\Core\Cache\FilesystemCacheFactory;
...
$cache = new FilesystemCacheFactory('data');
$this->cache = $cache->create('EventsAPI');
$this->cache->set('token', 'test', 3600);

Cant seem to get working on Website Fontend

Hi There,

Just seem to be having an issue getting this working on the front end of the website (admin shows find). I am including my own jQuery, the required CSS/JS from debug bar is loaded, and when I try to debug the DebugBar using in my Page Controller init() function:

$foo = DebugBar::WhyDisabled();
d($foo);

The returned result is 'I don't know why'

There are no errors that I can see being logged (both JS/PHP)

If I can supply you with any useful info I can..

Using SilverStripe 3.5

Fatal error: Call to a member function getTitle() on null

I'm getting this error.
I'm using PHP 5.6
Mac OSX
Apache 2.4
Silverstripe 3.6.1

I ran multiple flushes, with no change.
Uninstall and flush again, and the site works again.

Fatal error: Call to a member function getTitle() on null in .../debugbar/code/DebugBarSilverStripeCollector.php on line 174
--

1 | 0.0006 | 240496 | {main}( ) | ../main.php:0
2 | 4.7042 | 7525160 | Director::direct( ) | ../main.php:191
3 | 131.4706 | 23252328 | RequestProcessor->postRequest( ) | ../Director.php:183
4 | 131.4707 | 23252552 | DebugBarRequestFilter->postRequest( ) | ../RequestProcessor.php:42
5 | 131.4707 | 23252672 | DebugBar::renderDebugBar( ) | ../DebugBarRequestFilter.php:57
6 | 131.4707 | 23254512 | DebugBar\JavascriptRenderer->render( ) | ../DebugBar.php:226
7 | 131.4707 | 23254808 | DebugBar\JavascriptRenderer->getJsInitializationCode( ) | ../JavascriptRenderer.php:981
8 | 131.4708 | 23255144 | DebugBar\JavascriptRenderer->getJsControlsDefinitionCode( ) | ../JavascriptRenderer.php:1015
9 | 131.4710 | 23268080 | DebugBarSilverStripeCollector->getWidgets( ) | ../JavascriptRenderer.php:1059

Any ideas on how to fix?

supply tagged version please

It would be great if you could supply a tagged version according with a changelog.

This way it's easier for composer to cache the package.

Also requirement of original debugbar as * is quite unstable if that package has a non-BC major version.

[BUG] too big header at the CMS

Getting an error from nginx when debugbar enabled at the CMS

2018/05/29 00:14:35 [error] 15667#15667: *903 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: *.run.local.pro, request: "GET /admin/pages/treeview HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "run.local.pro", referrer: "http://run.local.pro/admin/pages/"

Icons don't make much sense

I feel the currently used icons are not really the best choice. Here's my thought:

  • database is a more sensible icon for database
  • list for Parameters?
  • envelope for Messages
  • cookie (Not yet available :( ) for cookies (duh)
  • file-code-o for templates
  • check for Requirements? (this is a tricky one)

Javascript bindToJquery Error in debugbar.js Line 1115

Silverstripe: 4.1.2
Php: 7.1.12
Jquery: 3.3.1
Silverstripe-debugbar: 2.x-dev and others

i get a javascript error on the front end - not in the cms and can't figure out why:

Line: 1115: undefined is not a function (near '...jq(document).ajaxComplete...')

Enable TravisCI, Scrutinizer and Codecov.io

Hey @lekoala :)

As this module now has Travis configuration which runs Codecov.io code coverage, could you enable TravisCI and ScrutinizerCI? Codecov.io should enable automatically once a successful coverage run on Travis completes.

config_collector disables FulltextSearchable

Versions

silverstripe/cms => 4.3.3
lekoala/silverstripe-debugbar => 2.0.3

Problem

Enabling config_collector disabled the Search extension.

Information

I just installed silverstripe-debugbar on a SilverStripe installation based on silverstripe/recipe-cms 4.3 with FulltextSearchable::enable(), and noticed that my $SearchForm was not being printed.

I have not dug much into it, but seems like config_collector modifies the configurations disabling the search extension.
After disabling config_collector, the Search functionality came back.

The results from d(ContentController::get_extensions()) where different after enabling config_collector

composer require error

Hi if you use as suggested install method - it throws error like this because it is gonna try to add 1.1-dev

composer require --dev lekoala/silverstripe-debugbar

lekoala/silverstripe-debugbar 1.1.x-dev requires silverstripe/framework ~3.2 

My silverstripe is 4.0.0 - So I just used.

"lekoala/silverstripe-debugbar":"dev-master"

Consolidate docs?

@robbieaverill Thanks for writing awesome docs! I do wonder if they're a bit too scattered though - it's quite likely that devs will miss essential docs because they're spread across a dozen pages. Could we condense this into the README? I think in general, anchor links plus a long README are preferrable to mini-pages with half a screen of content. That definitely has it's limits, e.g. the GraphQL module README has grown too large. But in general, there's a lot of power in the ability to skim read by scrolling, and use browser search on a single page.

Problems with own jquery

On my setup i block standard (old) jquery but use my own which i include when rendering the templates.

Unfortunately debugbar wants to inject the javascript before my own jquery is put to requirements, so it's called before and voila - ReferenceError: jQuery is not defined

For now i have to inject my own jquery in Page_Controller::init to get debugbar work, another approach to inject required javascript as late as possible would be great.

Maybe RequestFilter could work? https://docs.silverstripe.org/en/3.3/developer_guides/controllers/requestfilters/

Should it work with ss3.6.2 on php7.1?

Hi,
Can't get it working on ss3.6.2 on php7.1, not in frontend and not in admin. Environment is dev (setting in _ss_environment.php).
Should it work with this combination?

Certain SS_Database manipulations passes array to DebugBarDatabaseNewProxy__constructor()

2 examples thereof reside within silverstripe/auditor and silverstripe/fulltextsearch modules.
This causes an issue with DebugBarDatabaseNewProxy::__construct() which expects a MySQLDatabase object parameter.

Steps to reproduce:

  1. Set up a vanilla ss3 install composer create-project silverstripe/installer ss3
  2. Install auditor module composer require silverstripe/auditor or composer require silverstripe/fulltextsearch
  3. Install debugbar composer require lekoala/silverstripe-debugbar
  4. dev/build and flush, then when visiting the front-end of your new site the below error is produced

silverstirpe/auditor example:
image

silverstripe/fulltextsearch example:
image

Silverstripe 4.1

Doesn't this work with Silverstripe 4.1? I'm getting errors when running the site after installing this:

[Emergency] Uncaught SilverStripe\Core\Injector\InjectorNotFoundException: ReflectionException: Class Psr\SimpleCache\CacheInterface.cacheblock does not exist in /Library/WebServer/Documents/rtv_ss4/vendor/silverstripe/framework/src/Core/Injector/InjectionCreator.php:17 Stack trace: #0 

Trace
SilverStripe\Core\Injector\InjectionCreator->create(Psr\SimpleCache\CacheInterface.cacheblock, Array) 
Injector.php:585
SilverStripe\Core\Injector\Injector->instantiate(Array, Psr\SimpleCache\CacheInterface.cacheblock, singleton) 
Injector.php:988
SilverStripe\Core\Injector\Injector->getNamedService(Psr\SimpleCache\CacheInterface.cacheblock, 1, Array) 
Injector.php:941
SilverStripe\Core\Injector\Injector->get(Psr\SimpleCache\CacheInterface.cacheblock) 
SSViewer.php:558
SilverStripe\View\SSViewer->getPartialCacheStore() 
SSViewer.php:596
SilverStripe\View\SSViewer->includeGeneratedTemplate(/Library/WebServer/Documents/rtv_ss4/silverstripe-cache/_www/.cachevendor.silverstripe.assets.templates.SilverStripe.Assets.Flysystem.PublicAssetAdapter_HTAccess.ss, SilverStripe\View\ArrayData, , Array, ) 
SSViewer.php:674
SilverStripe\View\SSViewer->process(SilverStripe\View\ArrayData, , ) 
SSViewerProxy.php:36
LeKoala\DebugBar\Proxy\SSViewerProxy->process(SilverStripe\View\ArrayData) 
AssetAdapter.php:191
SilverStripe\Assets\Flysystem\AssetAdapter->renderTemplate(SilverStripe\Assets\Flysystem\PublicAssetAdapter_HTAccess) 
AssetAdapter.php:154
SilverStripe\Assets\Flysystem\AssetAdapter->configureServer(1) 
AssetAdapter.php:120
SilverStripe\Assets\Flysystem\AssetAdapter->flush() 
FlysystemAssetStore.php:897
SilverStripe\Assets\Flysystem\FlysystemAssetStore::flush() 
FlushMiddleware.php:22
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
RequestProcessor.php:66
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure) 
Director.php:370
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest) 
HTTPApplication.php:48
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest) 
call_user_func(Closure, SilverStripe\Control\HTTPRequest) 
HTTPApplication.php:66
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest) 
call_user_func(Closure, SilverStripe\Control\HTTPRequest) 
ErrorControlChainMiddleware.php:56
SilverStripe\Core\Startup\ErrorControlChainMiddleware->SilverStripe\Core\Startup\{closure}(SilverStripe\Core\Startup\ErrorControlChain) 
call_user_func(Closure, SilverStripe\Core\Startup\ErrorControlChain) 
ErrorControlChain.php:236
SilverStripe\Core\Startup\ErrorControlChain->step() 
ErrorControlChain.php:226
SilverStripe\Core\Startup\ErrorControlChain->execute() 
ErrorControlChainMiddleware.php:69
SilverStripe\Core\Startup\ErrorControlChainMiddleware->process(SilverStripe\Control\HTTPRequest, Closure) 
HTTPMiddlewareAware.php:62
SilverStripe\Control\HTTPApplication->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest) 
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure) 
HTTPApplication.php:67
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, 1) 
HTTPApplication.php:49
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest) 
index.php:26

Release 1.0.0

Hey @lekoala

With the completed merge of the following PRs, the module seems to be stable enough for a 1.0.0 release - what do you think?

The last step would probably be to flesh our the documentation for this module a little more and include some screenshots etc, which I am working on at the moment. I'll push a pull request when it's done.

Our team will be looking at upgrading this for SS4 in the next week or two as well adding a couple of new features which are not really doable in SS3.

Any thoughts on this?

Tooltip visibility

Tooltips get an opacity of 70%, making them pretty unreadable. Standard 100% would probably do fine

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.