The ultimate debugging and development tool for ProcessWire

Last update: May 26, 2022

Tracy Debugger for ProcessWire logo

Tracy Debugger for ProcessWire

The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

Integrates and extends Nette's Tracy debugging tool

35+ custom tools designed for effective ProcessWire debugging and lightning fast development

Tracy Debug Bar Kitchen Sink

Documentation

Documentation is available at: https://adrianbj.github.io/TracyDebugger/

Support Forum

For support for this module, please visit this thread on the ProcessWire forum: https://processwire.com/talk/forum/58-tracy-debugger/

ProcessWire Modules Directory

https://modules.processwire.com/modules/tracy-debugger/

Installation

It is recommended to install via the ProcessWire admin Modules > Site > Add New > Add Module from Directory using the TracyDebugger class name.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(See included LICENSE file for full license text.)

GitHub

https://github.com/adrianbj/tracydebugger
Comments
  • 1. auto detecting .test domains

    I think the TracyDebugger module auto detects .dev domains. Can you also make it detect .test domains?

    I'm moving my development sites to use .test instead of .dev because of https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

    Reviewed by gmclelland at 2017-10-17 16:26
  • 2. Crash with 1.9.4 version, when "exit;".

    Hello again)

    After upgrading to 1.9.4, debugger has crashes if template contain exit code.

    Console tells: ReferenceError: ace is not defined function getTracyTemplatePath() {

    And when exit code remved: : NetworkError: A network error occurred.

    P.S. Syntax highlighting is great!

    Reviewed by M-O-Z-G at 2016-06-19 21:23
  • 3. Seeing PHP errors with the latest version

    Hi Adrian,

    After installing the latest version, I'm seeing the following error

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../site/modules/TracyDebugger/TracyDebugger.module:1123
    
    ErrorException: count(): Parameter must be an array or an object that implements Countable in /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ProcesswireInfoPanel.php:198
    Stack trace:
    #0 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ProcesswireInfoPanel.php(198): Tracy\Bar->Tracy\{closure}(2, 'count(): Parame...', '/Users/glenn/we...', 198, Array)
    #1 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(159): ProcesswireInfoPanel->getPanel()
    #2 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(108): Tracy\Bar->renderPanels()
    #3 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Debugger.php(272): Tracy\Bar->render()
    #4 [internal function]: Tracy\Debugger::shutdownHandler()
    #5 {main}
    

    and on another site the same

    ErrorException: count(): Parameter must be an array or an object that implements Countable in /Users/glenn/websites/othersite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ProcesswireInfoPanel.php:198
    Stack trace:
    #0 /Users/glenn/websites/othersite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ProcesswireInfoPanel.php(198): Tracy\Bar->Tracy\{closure}(2, 'count(): Parame...', '/Users/glenn/we...', 198, Array)
    #1 /Users/glenn/websites/othersite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(159): ProcesswireInfoPanel->getPanel()
    #2 /Users/glenn/websites/othersite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(108): Tracy\Bar->renderPanels()
    #3 /Users/glenn/websites/othersite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Debugger.php(272): Tracy\Bar->render()
    #4 [internal function]: Tracy\Debugger::shutdownHandler()
    #5 {main}
    

    I'm running Apache/2.4.28 (Unix) PHP/7.2.0beta3

    When I visit the modules page, I also see the following errors:

    1x | PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../Inputfield/InputfieldFile/InputfieldFile.module:637
    --
    1× | PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../Inputfield/InputfieldFile/InputfieldFile.module:229
    
    Reviewed by gmclelland at 2017-10-17 16:23
  • 4. All new releases making website slowest

    After v4.20.17, all new releases making website loading slowest (admin and frontend). v4.20.17 working normal.

    Checked versions

    • 4.21.0
    • 4.21.1
    • 4.21.2
    • 4.21.3
    • 4.21.4

    System

    • Macos Mojave
    • PHP 7.4.5 (with https://github.com/laravel/valet)
    • mariadb 15.1
    Reviewed by trk at 2020-04-20 14:49
  • 5. PHP Warnings if no $_SERVER['REQUEST_URI‘] is defined

    Having your module installed and executing something from the command line using wireshell there is no $_SERVER['REQUEST_URI‘] defined which leads to some PHP notices:

    PHP Notice:  Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 207
    
    Notice: Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 207
    PHP Notice:  Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 211
    
    Notice: Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 211
    PHP Notice:  Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 844
    
    Notice: Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 844
    PHP Notice:  Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 844
    
    Notice: Undefined index: REQUEST_URI in /../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module on line 844
    

    It would be great if you could implement a check before accessing $_SERVER['REQUEST_URI‘].

    Reviewed by justb3a at 2016-12-15 13:50
  • 6. Uncaught ReferenceError: Tinycon is not defined at ?_tracy_bar=js&v=2.8.3&XDEBUG_SESSION_STOP=1:1526

    Hi, Adrian! This popped up during module development. Don't know why Tinycon si undefined. Maybe just checking if Tinycon is defined before doing anything with it would be enough.

    Reviewed by matjazpotocnik at 2021-03-27 19:02
  • 7. Please add a config setting to disable log sorting

    Hey @adrianbj

    As you already know I'm using the logs panel for showing information about triggered migrations from RockMigrations. The problem with the current implementation of the logs panel is that this messes with the exact execution order of my migration logs because there are always many entries within one second. I've done some research and tried different approaches (like adding the line number to the timestamp and sorting afterwards), but the best option seems to be to simply introduce a setting that enables me to disable the sort on this line: https://github.com/adrianbj/TracyDebugger/blob/c024f995dfa8be5e5238dc87995afd49da1ca642/panels/ProcesswireLogsPanel.php#L84

    When disabled, I get a clean log with all my rockmigration logs in place an in correct order:

    image

    I'm totally fine with not having a GUI for this setting as I think nobody else will ever need this...

    Thx in advance!

    Reviewed by BernhardBaumrock at 2022-02-19 16:17
  • 8. Recursion due PageArray request.

    Hello, I'm testing PW3 now, and found some buggy behavior with get request to dump panel or logger. For example:

    $page->get("FIELD_PAGE_ARRAY_NAME");

    With Tracy Debugger 1.8* such requests runs to 500 Server error. But after upgrade to 1.9.0 the request gets a recursion from array item _wire protected => ProcessWire\ProcessWire.

    Works well in PW2.7.*

    Reviewed by M-O-Z-G at 2016-06-18 20:44
  • 9. Uncaught TypeError: explode() expects parameter 2 to be string, boolean given

    MacOS 10.14.3 PHP 7.2.15 nginx/1.15.8 (via Laravel Valet) Tracy 2.6.1 Tracy Debugger 4.18.6

    Error stack

    Fatal Error: Uncaught TypeError: explode() expects parameter 2 to be string, boolean given in /Users/rudy/Sites/profile1/public/site/modules/TracyDebugger/tracy-2.6.x/src/Tracy/Bar/assets/loader.phtml:16
    Stack trace:
    #0 /Users/rudy/Sites/profile1/public/site/modules/TracyDebugger/tracy-2.6.x/src/Tracy/Bar/assets/loader.phtml(16): explode('?', false)
    #1 /Users/rudy/Sites/profile1/public/site/modules/TracyDebugger/tracy-2.6.x/src/Tracy/Bar/Bar.php(113): require('/Users/rudy/Sit...')
    #2 /Users/rudy/Sites/profile1/public/site/modules/TracyDebugger/tracy-2.6.x/src/Tracy/Debugger/Debugger.php(330): Tracy\Bar->render()
    #3 [internal function]: Tracy\Debugger::exceptionHandler(Object(TypeError))
    #4 {main}
    thrown (line 16 of /Users/rudy/Sites/profile1/public/site/modules/TracyDebugger/tracy-2.6.x/src/Tracy/Bar/assets/loader.phtml) 
    
    This error message was shown because: you are logged in as a Superuser. Administrator has been notified. Error has been logged.
    
    Reviewed by lesaff at 2019-03-03 13:11
  • 10. 4.23 does not work properly with AJAX requests in some server setups

    Hey @adrianbj. I've just tried out the 4.23 update, and ran into an issue: the module no longer displays AJAX requests on the live server.

    Tracy docs mention that Tracy now uses "temporary files" for storing data, and I'm suspecting that this is the issue: in this case server is load balanced, and most directories are not shared among instances, and PHP / Apache user has very limited write access to files.

    Do you know where Tracy stores these files? Is it cache directory specific to ProcessWire, or something else? If I knew where those files are going, and/or could somehow configure their path myself, I might be able to further debug and perhaps bypass the issue.

    If that's not possible, Tracy announcement post also mentioned that sessions can still be used. Is there a possibility to add this as an option?

    For the time being I'm going to restore TD 4.22.

    Reviewed by teppokoivula at 2021-12-25 13:25
  • 11. In some pages i am getting undefined index: path in ....

    When i get this error tracy toolbar not apper

    Using TracyDebugger 4.9.29

    <b>Notice</b>:  Undefined index: path in <b>/....../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module</b> on line <b>2001</b><br />
    <br />
    <b>Notice</b>:  Undefined index: path in <b>/....../site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module</b> on line <b>2001</b><br />
    

    2018-03-14 21 59 00

    Reviewed by trk at 2018-03-14 19:01
  • 12. TD causing exceptions to be thrown when they shouldn't be

    @adrianbj I noticed exceptions getting thrown unexpectedly here and eventually tracked it down to a hook added in TracyDebugger.module.php:

    // override default PW core behavior that converts exceptions to string
    $this->wire()->addHookAfter('Wire::trackException', function($event) {
    	$exception = $event->arguments(0);
    	if($this->wire('config')->ajax && ($exception instanceof WireException || $exception instanceof \ProcessWire\WireException)) {
    		// intentionally blank
    	}
    	else {
    		throw $exception;
    	}
    });
    

    PW is only supposed to throw the given Exception (arg0) from the trackException() method if the $severe argument (arg1) is true and $config->allowExceptions === true;. I think the hook above shouldn't throw the exception because it would have been already thrown in the trackException() method if it was supposed to be (since this is an after hook).

    The issue is that PW calls the trackException() method sometimes for non-fatal errors ($severe===false) and it is hookable so that anything else can log or report the error for additional debugging info. If the $config->allowExceptions is true, then the exception is considered fatal only if the $severe argument is also true... in which case it throws the exception. But if the $severe argument is false, then PW expects to be able to continue its business and fix whatever caused the exception. So when TD comes in and throws an exception when it shouldn't be, it potentially bypasses code that is meant to resolve a non-fatal exception.

    Reviewed by ryancramerdesign at 2021-05-17 13:54
  • 13. Deletion warning when adding options to Select Options field

    Not sure why Tracy would affect a Select Options field in this way, but I've noticed that I get a warning about deleting options when I am adding options to a new Select Options field that does not yet have any options.

    Screencast:

    options

    When Tracy is disabled I don't get this notice when adding options.

    Reviewed by Toutouwai at 2020-02-24 04:14
Kint - a powerful and modern PHP debugging tool.
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

Jun 29, 2022
Xdebug — Step Debugger and Debugging Aid for PHP

Xdebug Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development aids, such as stack traces, a code profiler, fe

Jun 26, 2022
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.

A server for debugging more than just Laravel applications. Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps d

Jun 28, 2022
A collection of helper methods for testing and debugging API endpoints.

Laravel API Test Helpers This is a collection of helper methods for testing and debugging API endpoints. Installation You can install the package via

Apr 16, 2022
Sage - Insightful PHP debugging assistant ☯
 Sage - Insightful PHP debugging assistant ☯

Sage - Insightful PHP debugging assistant ☯ At first glance Sage is just a pretty replacement for var_dump() and debug_backtrace(). However, it's much

Jun 4, 2022
WordPress debugging made simple.
WordPress debugging made simple.

Loginator Debugging WordPress can sometimes be a pain, our goal is to make it easy, which is why Loginator was built with this in mind. From creating

Feb 12, 2022
A tool to profile mysql queries in php env.
A tool to profile mysql queries in php env.

MysqlQueryProfiler This tool helps you to quickly profile a mysql query in a PHP 7.4+ environnement. You can also compare 2 queries. This image shows

Jul 30, 2021
This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception Tracking.

Tideways Middleware for Laravel Octane This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception T

Jan 6, 2022
Laravel Dumper - Improve the default output of dump() and dd() in Laravel projects

Laravel Dumper Improve the default output of dump() and dd() in Laravel projects. Improves the default dump behavior for many core Laravel objects, in

May 25, 2022
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

Tracy - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Jun 26, 2022
Basic Authentication handler for the JSON API, used for development and debugging purposes

Basic Authentication handler This plugin adds Basic Authentication to a WordPress site. Note that this plugin requires sending your username and passw

Jun 16, 2022
Kint - a powerful and modern PHP debugging tool.
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

Jun 29, 2022
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.

Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to

Jun 10, 2022
Symprowire is a PHP MVC Framework based and built on Symfony, using the ProcessWire CMS as DBAL and Service Provider.

Symprowire - PHP MVC Framework for ProcessWire 3.x Symprowire is a PHP MVC Framework based and built on Symfony using ProcessWire 3.x as DBAL and Serv

Jan 16, 2022
✨An Ultimate NPC plugin made by brokiem for PocketMine-MP.
✨An Ultimate NPC plugin made by brokiem for PocketMine-MP.

SimpleNPC An Ultimate NPC plugin made by brokiem for PocketMine-MP. ✨ Features Migration from Slapper supported! ✔ Right click to interact! ✔ NPC can

Jun 16, 2022
🐕‍🦺 An Ultimate Pets plugin for PocketMine-MP.
🐕‍🦺 An Ultimate Pets plugin for PocketMine-MP.

SimplePets An Ultimate Pets plugin made by broki for PocketMine-MP. ✨ Features MySQL and SQLite database Anti sql injection All mobs in Minecraft Pets

Jun 25, 2022
Ultimate solution to your KopoKopo needs

ultimate-kopokopo Smith Ultimate Kopokopo PHP SDK This is a module to assist php developers in consuming Kopokopo's API Installation You can install t

Nov 9, 2021
The Ultimate Password Locker

THIS REPO DOES NOT CONTAIN ALL THE CODE FOR SAFETY REASONS Padlock Your Personal Information is Safe and sound. With the power of PHP and MySQL, I was

Dec 13, 2021
New Ultimate Module Creator for Magento 1.7 +

Ultimate Module Creator 1.9.6.0 Notice Because of lack of time, motivation and because Magento2 is already a mature platform, I'm deciding to pull the

May 30, 2022