About Tracy Debugger

Tracy debugger from Nette with several PW specific custom tools.

Category 1Development Tools
Modules that have more to do with assisting development of a site rather than managing its content.
Category 2Logs/Monitoring
Modules that maintain activity logs or monitor and report activity in some form or another.
Release StateStable
Should be safe for use in production environments. *
Authoradrian
Module Version4.3.25
Class NameTracyDebugger
Compatibility2.7, 3.0
Date AddedFebruary 20, 2016
Last UpdatedSeptember 16, 2017
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/TracyDebugger/
How to install or uninstall modules

README

Tracy Debugger

Processwire module for running the Tracy debugger from Nette.

Blog Post Documentation

https://processwire.com/blog/posts/introducing-tracy-debugger/

Support forum

https://processwire.com/talk/topic/12208-tracy-debugger/

About Tracy

Tracy library is a useful helper for everyday PHP programmers. It helps you to:

  • quickly detect and correct errors with an expandable call stack tree
  • log errors (and optionally receive emails when an error occurs in production mode)
  • dump variables
  • measure execution time of scripts/queries
  • see memory consumption between breakpoints

Module features

Includes config settings for a variety of Tracy options.

A custom ProcessWire panel in the debug bar provides all the information from the PW admindebug tools, as well a tree version of the current Page object.

Additionally, content can be dumped to the page via TD::dump() or to the debug bar via TD::barDump(),or logged via TD::log() from PW template files. eg.

TD::debugAll($page, 'Current Page');
   Aliases;  debugAll(), da()

TD::barDump($page, 'Current Page');
   Aliases;  barDump(), bd()

TD::dump($page);
   Aliases; dump(), d()

TD::log('Log Message');
    Alias; l()

TD::fireLog('Log Message');
    Alias; fireLog(), fl()

TD::addBreakpoint('Name');
    Alias; addBreakpoint(), bp()

TD::timer();
    Aliases; timer(), t()

By default, manually logged content is sent to: /site/assets/logs/tracy/info.log,but you can specify an optional second parameter to one of the following: 'debug', 'info', 'warning', 'error', 'exception', 'critical' files.

eg. TD::log('Log Message', 'debug'); which will put the message in the debug.log file.

FireLog

To make fireLog work, you need to add some browser extensions:

Chrome:

Firefox:

License

This program is free software; you can redistribute it and/ormodify 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 Licensealong 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

  • Mike Sutherland

    Mike Sutherland 2 years ago 10

    As soon as this was installed I got an error.
    Parse Error: syntax error, unexpected '[' (line 19 of /home/processw/public_html/site/modules/TracyDebugger/PerformancePanel/Register.php)

    • Adrian

      Adrian 2 years ago 00

      Hi Mike,

      The issue is the PHP version you are running. You are on PHP 5.3 or less - the error you are getting is related to the short array syntax that wasn't introduced until 5.4. I see this as an oversight with the Performance Panel plugin for Tracy. I will file a Github issue with that project to see if they will make it compatible with 5.3.

      In the meantime, replace line 19 and 20 with this:

      ```
      public static $data = array();
      public static $relations = array();
      ```

    • Adrian

      Adrian 2 years ago 00

      Mike - the latest version of this module now has that fix in place. I will keep that fix, but I have asked the Performance Panel author to apply to his core as well.

  • Jugibur

    Jugibur 2 years ago 10

    Great module, Adrian, thanks!

  • pwired

    pwired 2 years ago 00

    I just installed the tracy module. I am using PW 2.7.2 with php 5.4.12 and am on windows. I am having this error at the bottom of the front:
    Call to undefined function posix_getpwuid() in \site\modules\TracyDebugger\ProcesswireInfoPanel.inc on line 172
    The toolbar doesn't show up
    Has this something to do that I am on windows ?

    • Adrian

      Adrian 2 years ago 00

      Hi @pwired,

      Yep, sorry about that, it is a Windows issue. I have just committed an update that will prevent the error. Please let me know how it goes for you.

      • pwired

        pwired 2 years ago 10

        Hi Adrian,
        Thanks for releasing TracyDebugger version 080 because now it is working :)
        After installing version 080, the error message has gone and immediately
        the Tracy Toolbar showed up. Thanks a lot.

  • Sérgio Jardim

    Sérgio Jardim 2 years ago 30

    Adrian, this is an amazing and useful module! Thank you! Excellent work!
    It is as awesome as the debug info provided the Django framework. But looks better! :D

    • Adrian

      Adrian 2 years ago 00

      Glad you're finding it so useful - I really appreciate the feedback!

  • Jürgen

    Jürgen 1 year ago 30

    One of the most useful modules for Processwire. It helps me detecting problems during development in an easy way. Saves me a lot of time.

  • maks

    maks 3 months ago 10

    ...a very good job! thanks!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.