The ultimate debugging and development tool for ProcessWire

Overview

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.)

Comments
  • auto detecting .test domains

    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/

    opened by gmclelland 41
  • Crash with 1.9.4 version, when

    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!

    opened by M-O-Z-G 19
  • Seeing PHP errors with the latest version

    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
    
    opened by gmclelland 17
  • All new releases making website slowest

    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
    opened by trk 15
  • add language switcher panel

    add language switcher panel

    image

    One of the few things that I really missed from AdminOnSteroids - so I built a tracy panel instead :) I mean AOS has many great features but only a few that I really need for my daily work. This is one of them.

    opened by BernhardBaumrock 14
  • PHP Warnings if no $_SERVER['REQUEST_URI‘] is defined

    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‘].

    opened by justb3a 13
  • Uncaught ReferenceError: Tinycon is not defined     at ?_tracy_bar=js&v=2.8.3&XDEBUG_SESSION_STOP=1:1526

    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.

    opened by matjazpotocnik 12
  • Please add a config setting to disable log sorting

    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!

    opened by BernhardBaumrock 11
  • Recursion due PageArray request.

    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.*

    opened by M-O-Z-G 11
  • Uncaught TypeError: explode() expects parameter 2 to be string, boolean given

    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.
    
    opened by lesaff 10
  • 4.23 does not work properly with AJAX requests in some server setups

    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.

    opened by teppokoivula 8
  • Markup added even though template is set in

    Markup added even though template is set in "No Debug Bar" setting

    Hi,

    When working on a module, I noticed that even though I disabled the template in the No debug bar in selected frontend templates, some markup was added right before </body>.

    This is due to the line 1092. Best would be to check if the template is not in the list of excluded ones and return before any additions are made.

    Let me know if you need more infos.

    opened by romaincazier 3
  • TD causing exceptions to be thrown when they shouldn't be

    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.

    opened by ryancramerdesign 8
  • Deletion warning when adding options to Select Options field

    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.

    opened by Toutouwai 5
Releases(4.23.41)
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

null 2.7k Dec 25, 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

Xdebug 2.8k Jan 3, 2023
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

Buggregator 311 Jan 4, 2023
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

Stephen Jude 49 Jul 26, 2022
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

null 27 Dec 26, 2022
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

Poly Plugins 2 Feb 12, 2022
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

null 8 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

Tideways 7 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

Galahad 301 Dec 26, 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 - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Nette Foundation 1.6k Dec 23, 2022
Multi-language field export/import tool for ProcessWire

Language field export/import for ProcessWire Typically the way you translate page field values in ProcessWire is to edit a page, view the text in one

Ryan Cramer 3 Aug 19, 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

WordPress REST API Team 667 Dec 31, 2022
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

null 2.7k Dec 25, 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.

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

Dieter Coopman 196 Dec 28, 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

Luis Mendez 7 Jan 16, 2022
PHP_Depend is an adaptation of the established Java development tool JDepend. This tool shows you the quality of your design in terms of extensibility, reusability and maintainability.

PHP Depend Documentation PHP Depend for enterprise Available as part of the Tidelift Subscription. The maintainers of PHP Depend and thousands of othe

PHP_Depend 837 Dec 14, 2022
ProcessWire Fieldtype for collecting and store oembed data

FieldtypeOembed What it does Store, collect and update oembed data from external sources. It used the great PHP Library Essence by Félix Girault and a

Neue Rituale 4 May 9, 2022
Manifest is a ProcessWire module that bridges between Twig and Webpack.

Manifest is a ProcessWire module that bridges between Twig and Webpack.

Rudy Affandi 4 Nov 12, 2022
A module allowing you to write your Processwire template using MJML and get a converted HTML output using MJML API.

PageMjmlToHtml A module allowing you to write your Processwire template using MJML and get a converted HTML output using MJML API. This is considered

Romain Cazier 7 Oct 5, 2022