All Projects → Konafets → typo3_debugbar

Konafets / typo3_debugbar

Licence: GPL-2.0 license
A TYPO3 debugbar utilizing the PHP Debugbar to provide information of the system health to the frontend.

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to typo3 debugbar

Typo3 Rector
Rector for TYPO3
Stars: ✭ 107 (+181.58%)
Mutual labels:  typo3
autoloader
⚙️ Best TYPO3 Swiss Army knife ever ⚙️
Stars: ✭ 22 (-42.11%)
Mutual labels:  typo3
urlguard
TYPO3 extension urlguard. Allows to define what query parameters will be passed to newly created typolinks.
Stars: ✭ 16 (-57.89%)
Mutual labels:  typo3
Typo3 Realurl
**Vintage** RealURL extension for TYPO3 CMS. Read the wiki if you have questions!
Stars: ✭ 119 (+213.16%)
Mutual labels:  typo3
symfony-debug-toolbar-git
Get the latest Git commit information into Symfony debug toolbar
Stars: ✭ 30 (-21.05%)
Mutual labels:  debugbar
vscode-typo3-typoscript
An extension for VS Code which provides support for the TypoScript syntax.
Stars: ✭ 18 (-52.63%)
Mutual labels:  typo3
Clitools
🔧 CliTools for Docker, PHP / MySQL development, debugging and synchonization
Stars: ✭ 86 (+126.32%)
Mutual labels:  typo3
yii-debug
Yii debug panel extension
Stars: ✭ 23 (-39.47%)
Mutual labels:  debugbar
Laravel Debugbar
Laravel Debugbar (Integrates PHP Debug Bar)
Stars: ✭ 13,485 (+35386.84%)
Mutual labels:  debugbar
migration
TYPO3 Migration Framework for every kind of migration/imports from CLI (e.g. Templavoila to Gridelements, tt_news to news, etc...)
Stars: ✭ 52 (+36.84%)
Mutual labels:  typo3
Aimeos Typo3
TYPO3 e-commerce extension for professional, ultra fast online shops, complex B2B applications and #gigacommerce
Stars: ✭ 157 (+313.16%)
Mutual labels:  typo3
debugbar-plugin
Integrates PHP Debugbar with October CMS
Stars: ✭ 36 (-5.26%)
Mutual labels:  debugbar
ddev-for-typo3-extensions
This repo contains an example DDEV configuration to provide a development environment for a single TYPO3 CMS extension.
Stars: ✭ 22 (-42.11%)
Mutual labels:  typo3
Ext Solr
A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
Stars: ✭ 118 (+210.53%)
Mutual labels:  typo3
rest
REST webservices for TYPO3 CMS
Stars: ✭ 78 (+105.26%)
Mutual labels:  typo3
Frontend editing
TYPO3 CMS frontend editing
Stars: ✭ 98 (+157.89%)
Mutual labels:  typo3
typo3-typoscript-lint
Find coding errors in your TypoScript files.
Stars: ✭ 78 (+105.26%)
Mutual labels:  typo3
TYPO3CMS-Reference-CoreApi
"TYPO3 Explained": Main TYPO3 Core Document: Main classes, Security, TypoScript syntax, Extension API and much more
Stars: ✭ 19 (-50%)
Mutual labels:  typo3
docker-typo3
Environment to develop and run TYPO3 in Docker containers
Stars: ✭ 16 (-57.89%)
Mutual labels:  typo3
webp
Create a WebP copy for images (TYPO3 CMS)
Stars: ✭ 57 (+50%)
Mutual labels:  typo3

TYPO3 Debug Bar

Latest Stable Version Total Downloads Latest Unstable Version License

This is a package to integrate PHP Debug Bar with TYPO3. It uses several hooks to include the assets and itself into frontend output. It bootstraps some Collectors to work with TYPO3 and implements a couple custom DataCollectors, specific for TYPO3.

Read the documentation for more configuration options.

Screenshot

Info: Use the DebugBar only in development. It can slow the application down (because it has to gather data). So when experiencing slowness, try disabling some of the collectors.

The extension comes with the default collectors:

  • PhpInfoCollector: Show the PHP version
  • MessagesCollector: Collects messages from within the Application and pushing them to the DebugBar
  • TimeDataCollector: Here you can start and stop a timer. Default it times the Application. More in the Usage section
  • MemoryCollector: Show the Memory usage
  • ExceptionsCollector: Collects exceptions from withing the Application and pushing them to the DebugBar

And includes some custom collectors:

  • InfoCollector: Show the same information like the Info pane of the Admin Panel
  • MySqliCollector: Show all queries, including timing and the values of prepared statements
  • Typo3Collector: Show the TYPO3 version, Locale and Environment
  • AuthCollector: Show the username of the logged-in backend user
  • SessionCollector: Show session data

Installation

Require this package with composer. It is recommended to only require the package for development.

composer require konafets/typo3_debugbar --dev

Afterwards you need to activate the extension in the Extension Manager. The DebugBar is enabled by default and will be displayed to you if you are logged into the backend as an administrator.

Usage

The extension is configurable through the Extension Manager. There you can enable/disable the DebugBar as well as the DataCollectors.

Configuration

Use it everywhere

The Typo3DebugBar implements the SingletonInterface, therefore you can get the same instance via debugbar(). This opens the possibility to interact with the DebugBar from within TYPO3.

Log Exceptions

try {
    throw new Exception('foobar');
} catch (Exception $e) {
    debugBar()->addThrowable($e);
}

These will be shown in the Exception pane.

Add messages

debugBar()->info($object);
debugBar()->error('Error!');
debugBar()->warning('Watch out…');
debugBar()->addMessage('Another message', 'mylabel');
MessagesPane

Add timers

And start/stop timing:

debugBar()->startMeasure('render', 'Time for rendering');
debugBar()->stopMeasure('render');
debugBar()->addMeasure('now', TYPO3_START, microtime(true));
debugBar()->measure('My long operation', function() {
    // Do something…
});
debugbar_debug($value);

or even shorter:

startMeasure('render', 'Time for rendering');
stopMeasure('render');
addMeasure('now', TYPO3_START, microtime(true));
measure('My long operation', function() {
    // Do something…
});

Database

This pane shows all issued queries of the connection with the name Default. Is there is no connection with this name, the first connection of the ConnectionPool will be used.

With placeholders

Per default, the statements were shown as Prepared Statements, meaning the placeholders are inside the statement while the actual values are in a hidden table below each statement. To see them, click on the statement.

DatabasePane

With params

To render the values directly inside the statements, activate the option with_params in the extension settings.

Info: The extension uses the connectToDB hook to inject Doctrine\DBAL\Logging\DebugStack as a logger to the connection. At the end of the rendering process it retrieves the Logger and shows the logged queries. Its important to understand, that the extension adds Doctrine\DBAL\Logging\DebugStack in any case, even if its not shown in the frontend. This is due to log all queries from the very beginning ... but at that point the BE User is not initialized yet and its unclear if the DebugBar is enabled or not. Classical Chicken-and-egg problem.

VarDump

Everybody knows the output of DebugUtility::var_dump() ... and everybody knows that it breaks the layout. Lets move the output to the TYPO3 Debugbar. Use Konafets\Typo3Debugbar\Overrides\DebuggerUtility::var_dump($variable) and get an output like this:

VarDumpPane

Lifecycle

As mentioned above the extension uses hooks. The following figure shows the usage during a request life cycle.

LifeCycle

Credits

The extension is heavily inspired by the Laravel Debugbar. Thanks for your good work Barry vd. Heuvel. I also copied the idea of a ServiceProvider from Laravel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].