adrian

Tracy Debugger

Recommended Posts

Just now, netcarver said:

For example, another alternative is to just keep the existing button but make the basics a non-collapsed table with all the additional details in the collapsed sections following it. That would make the basics stand out pretty well in the issue reports.

I think that makes most sense.

Just like this or do you think that a table layout would help with clarity?

image.png.4d36b439b57a5a581899508a1055f318.png

 

  • Like 2

Share this post


Link to post
Share on other sites

Personally, I think a table would really help the clarity of the server details.

| Server | Version |
| ------:|:------- |
|     PW | $pw_version |
|    PHP | $php_version |
|   ...

Edited to add:

At least to my eye, it's hard to tell that the "Server Details", "Server Settings" and "Module Details" lines are actually click targets that open up a hidden list. Yeah, I know there are triangle markers as visual clues, but I mistook those simply as list-item markers the first couple of times I saw these in issues. I'm more used to click targets being styled as links or saying something like (more...) or something like that. 

  • Like 2

Share this post


Link to post
Share on other sites

Agreed, that does look nice. I have committed a new version with the following changes. Now we just need to get people using it more regularly 🙂

Each section is structured as a table and with the Server Details not collapsed.

image.png.7ff2a0578f53bd492ad47d9929e6b77d.png


The plain text version is basically the same, just with section titles added for clarity.

SERVER DETAILS
ProcessWire: 3.0.108
PHP: 7.2.6
Webserver: Apache/2.4.33 (Unix) 
MySQL: 8.0.11


SERVER SETTINGS
allow_url_fopen: 1
max_execution_time: 120 (changeable)
max_input_nesting_level: 64
max_input_time: 60
max_input_vars: 1000
memory_limit: 128M
post_max_size: 8M
upload_max_filesize: 50M
xdebug: 
xdebug.max_nesting_level: 
GD: bundled (2.1.0 compatible)
GIF: 1
JPG: 1
PNG: 1
EXIF Support: 1
FreeType: 1
Imagick Extension: 


MODULE DETAILS
AdminOnSteroids: 1.9.8
BatchChildEditor: 1.8.12
BreadcrumbDropdowns: 0.1.0
CookieManagementBanner: 0.2.1
FieldtypeStreetAddress: 0.5.1
FormBuilder: 0.3.4
InputfieldFormBuilderFile: 0.0.2
InputfieldStreetAddress: 0.5.1
JquerySelectize: 1.0.4
MarkupSEO: 0.8.7
MarkupSitemap: 0.4.1
ModuleReleaseNotes: 0.10.7
ModuleSettingsImportExport: 0.2.9
PageRenameOptions: 1.0.4
ProcessAdminActions: 0.6.12
ProcessChildrenCsvExport: 1.7.0
ProcessFormBuilder: 0.3.4
ProcessWireUpgrade: 0.0.7
ProcessWireUpgradeCheck: 0.0.7
RestrictTabView: 1.1.3
TextformatterTagParser: 2.2.0
TracyDebugger: 4.10.25


 

  • Like 3

Share this post


Link to post
Share on other sites
Just now, netcarver said:

@adrian

That's more like it! Thank you.

Except I didn't check the output in Github - I was using another Markdown editor which was rendering the tables correctly, but Github isn't - working on fixing it now.

  • Like 1

Share this post


Link to post
Share on other sites
21 minutes ago, adrian said:

Except I didn't check the output in Github - I was using another Markdown editor which was rendering the tables correctly, but Github isn't - working on fixing it now.

Ok, now the tables render correctly with Github's MD parser.

Take a look and let me know if you have any suggestions.

  • Like 1

Share this post


Link to post
Share on other sites

@adrian That works really well, thank you! My only other suggestion about the version lists I added here. At this stage, it really isn't important - the information is much more visible in this format.

Share this post


Link to post
Share on other sites
1 minute ago, netcarver said:

@adrian That works really well, thank you! My only other suggestion about the version lists I added here. At this stage, it really isn't important - the information is much more visible in this format.

 

3 hours ago, netcarver said:

At least to my eye, it's hard to tell that the "Server Details", "Server Settings" and "Module Details" lines are actually click targets that open up a hidden list. Yeah, I know there are triangle markers as visual clues, but I mistook those simply as list-item markers the first couple of times I saw these in issues. I'm more used to click targets being styled as links or saying something like (more...) or something like that. 

I am not sure there is much I can do about this - those triangles are how Markdown generates the output for <details><summary> tags. If you have any ideas on an alternate approach, let me know though. Regardless, I think the key things is that Ryan (and other PW Issues regulars) will get to know this output and how it works.

  • Like 1

Share this post


Link to post
Share on other sites
On 8/1/2018 at 9:33 AM, netcarver said:

@adrian Thank you. I was putting together a version-gathering script to collect the data to paste, as Markdown, into GitHub issues - then guess what I found elsewhere in TD 🤔

Where do I find this? 🙄

Share this post


Link to post
Share on other sites

@bernhard

On the "ProcessWire Info and Links" panel.

screeny-0011.thumb.png.0bf21509185f7125e3299a9b96d9d11d.png

...then look near the top of the panel for the version list...

screeny-0012.png.cb57126373c24c343c4ce59c03928f95.png

...hit the copy button and then paste as part of any issue you raise on the Processwire-Issues repo.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@adrian

I've been trying out the Custom PHP panel features and it's working really well. There's cake and icing - but I've thought of a cherry. There's still scrolling involved when iterating something in the custom panel when it comes to saving what you are doing - if the panel could be moved right to the bottom of the config inputs, that would put the save button within easy reach (for those who aren't using AOS's feature to fix the submit button on the header.)

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, netcarver said:

@adrian

I've been trying out the Custom PHP panel features and it's working really well. There's cake and icing - but I've thought of a cherry. There's still scrolling involved when iterating something in the custom panel when it comes to saving what you are doing - if the panel could be moved right to the bottom of the config inputs, that would put the save button within easy reach (for those who aren't using AOS's feature to fix the submit button on the header.)

As you know (because you have been kindly testing it via PM), the new version now has an extra Submit button just below the customPHP code field to make it easier to quickly save and test multiple iterations of the code.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi Adrian, what do you think about adding a db() method/shortcut? So just like bdb() but for use (mainly) in the Tracy Console?

  • Like 2

Share this post


Link to post
Share on other sites
On 8/3/2018 at 10:56 PM, Robin S said:

Hi Adrian, what do you think about adding a db() method/shortcut? So just like bdb() but for use (mainly) in the Tracy Console?

Sure thing - just added to the latest version.

I know you know this already, but just a reminder for others that you can also do:

d($page, [6]);

to control the exact depth of the array/object being dumped.

  • Like 3

Share this post


Link to post
Share on other sites

Would anyone be interested in having an option to make bd() and d() calls output two versions - one with debugInfo on and one with it off?

I am finding that I often want both because sometimes the debugInfo version is useless, but then sometimes it contains really useful info not available without it, eg @horst's new image info: https://github.com/processwire/processwire/pull/117

Any thoughts on this?

  • Like 1

Share this post


Link to post
Share on other sites
On 5/14/2018 at 9:14 AM, bernhard said:

hey adrian, hope you are enjoying your vacation!

what do you think of adding a section in the request info panel that shows the code needed for creating this field via api (for example in process module)?


$form->add([
  'type' => 'page',
  'label' => __('Mail auswählen'),
  'derefAsPage' => 1, // single or null
  'inputfield' => 'InputfieldAsmSelect',
  'template_id' => 73, // mail
  'value' => 23669,
]);

The request info panel has all the necessary informations:

2018-05-14--18-13-08.png.1382a9f99221aa4e2f8447bba9b6df15.png

If we had a section "Field code" we could just create fields in the Backend and then copy/paste them in our modules 🙂

Hey - sorry about the delay on this. I have looked at your PR and it looks like a useful addition. I am just wondering though - what about if we rather not use the array approach like you have there. I don't really have a preference, although I think moving forward, I'll probably go with this approach: https://github.com/adrianbj/CookieManagementBanner/blob/master/CookieManagementBanner.config.php

but at the moment, most of my modules work like this: 

        $f = $this->wire('modules')->get("InputfieldCheckbox");
        $f->attr('name', 'enabled');
        $f->label = __('Enable Tracy Debugger', __FILE__);
        $f->description = __('Uncheck to completely disable all Tracy Debugger features.', __FILE__);
        $f->columnWidth = 50;
        $f->attr('checked', $data['enabled'] == '1' ? 'checked' : '' );
        $fieldset->add($f);

Do you think we need a config setting to determine which style is output?

Share this post


Link to post
Share on other sites
5 hours ago, adrian said:

Would anyone be interested in having an option to make bd() and d() calls output two versions - one with debugInfo on and one with it off?

+1 I've been also wondering about this for a while 🙂 

Share this post


Link to post
Share on other sites
On 5/26/2018 at 7:19 PM, adrian said:

Hey @bernhard - regarding your fd() idea - is there a major difference between it and using l() which already dumps to Tracy log files?

thx, that's a perfect solution i didn't know about 🙂 

 

8 hours ago, adrian said:

Do you think we need a config setting to determine which style is output?

Of course that would be the best option, but I don't think many people will need it anyway... I prefer the array syntax nowadays.

  • Like 1

Share this post


Link to post
Share on other sites

@adrian

I think I found a bug in the Diagnostics panel - it incorrectly shows the group name of a given file/directory for me. I think you may need to change line 160 of DiagnosticsPanel.php (which seems to be using the file's owner ID, rather than its group ID) to...

$group = !file_exists($path) ? '' : posix_getgrgid(filegroup($path));

Best wishes,
Steve

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, netcarver said:

@adrian

I think I found a bug in the Diagnostics panel - it incorrectly shows the group name of a given file/directory for me. I think you may need to change line 160 of DiagnosticsPanel.php (which seems to be using the file's owner ID, rather than its group ID) to...


$group = !file_exists($path) ? '' : posix_getgrgid(filegroup($path));

Best wishes,
Steve

Hi Steve - thanks for finding and debugging this!

Testing here on MacOS and it doesn't make any difference for me. Both versions return:

image.png.7773d6b8148091a42efb01471e05246e.png

but if your version works for you, then it makes sense to replace it.

I have changed locally and I'll commit with the next version sometime soon.

 

  • Like 1

Share this post


Link to post
Share on other sites

@adrian Strange. I'm on a Linux mint - which seems to use the paradigm of creating a group named the same as each user. I'm not sure that MacOS does that. In these cases, the original code always seemed to report the file's group as being the same as the owner - even when it was not. 

When you ls -al in the terminal you are, presumably, seeing ajones:staff as the owner and group? I wasn't. I was getting sed:www-data in the terminal but sed:sed in Tracy.

Maybe others can chime in here - but if the new line isn't introducing a regression, I can verify it fixes a 'bug' for me.

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, netcarver said:

When you ls -al in the terminal you are, presumably, seeing ajones:staff as the owner and group? I wasn't. I was getting sed:www-data in the terminal but sed:sed in Tracy.

Yes - as an example:

drwxr-xr-x   9 ajones  staff    288 Aug  6 09:36 wire

 

Since you playing around this panel and given your experience the Diagnostics module, I wonder if you have any thought about the Status and Notes that are being returned? Also, have you looked at the Filesystem Files option?

image.png.8df58eb3ff146d2f81934646b8e0b8e6.png

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, adrian said:

I wonder if you have any thought about the Status and Notes that are being returned?

Actually, I have been pondering making this more targeted. Let me gather thoughts and I'll either PM you a proof of concept or post more about it here.

  • Like 1

Share this post


Link to post
Share on other sites
On 1/31/2018 at 6:23 AM, adrian said:

You can also make use of the new:


bdb($var);

as a shortcut to:


bd($var, [6,999]);

hey adrian would you mind changing 999 to 9999 ? 999 is too low here for debugging my sql queries and I wonder why we have such a low setting for the "big" dump. I think it's fine to have a low setting for bd() but one would use bdb() only for dumping big dumps so I think 999 can often be limiting and then the benefit of having bdb() compared to bd($var, [6,9999]) is lost.

  • Like 2

Share this post


Link to post
Share on other sites
On 8/7/2018 at 1:03 PM, adrian said:

Testing here on MacOS and it doesn't make any difference for me. Both versions return:

Just and FYI: Ubuntu and Debian both display the correct information for me.

On another note, when minimizing the tracy bar (displayed lower right) it removes whichever panel is displayed. Is there a way to keep the target panel visible when the tracy bar is minimized? It doesn't matter if the panel is opened in a new window, the performance is the same.

Thanks for all your work on this module. It really is a time-saver.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By BitPoet
      MediaLibrary
      Update: MediaLibrary can now be found in the official module list.
      Out of necessity, I've started to implement a simple media library module.
      The basic mechanism is that it adds a MediaLibrary template with file and image fields. Pages of this type can be added anywhere in the page tree.
      The link and image pickers in CKEditor are extended to allow quick selection of library pages from dropdowns. In the link picker this happens in the MediaLibrary tab, where you can also see a preview of the selected image. In the image picker, simply select a library from the dropdown at the top, everything else is handled by standard functionality.
      I've put the code onto github. This module is compatible with ProcessWire 3.
      Steps to usage:
      Download the module's zip from github (switch to the pw3 branche beforehand if you want to test on PW 3.x) and unpack it into site/modules Click "Modules" -> "Refresh" in the admin Click "Install" for MediaLibrary For testing, create a page with the MediaLibrary template under home (give it an expressive title like 'Global Media') and add some images and files Edit a differnt page with a CKEditor field and add a link and an image to see the MediaLibrary features in action (see the screencap for details) Optionally, go into the module settings for MediaLibrary Note: this module is far from being as elaborate as Kongondo's Media Manager (and doesn't plan to be). If you need a feature-rich solution for integrated media management, give it a look.
      Feel free to change the settings for MediaFiles and MediaImages fields, just keep the type as multiple.
      There are some not-so-pretty hacks for creating and inserting the correct markup, which could probably be changed to use standard input fields, though I'm a bit at a loss right now how to get it to work. I've also still got to take a look at error handling before I can call it fit for production. All feedback and pointers are appreciated (that's also why I post this in the development section).

      Edit 09.03.2016 / version 0.0.4: there's now also a "Media" admin page with a shortcut to quickly add a new library.

      Edit 01.05.2016:
      Version 0.0.8:
      - The module now supports nested media libraries (all descendants of eligible media libraries are also selectable in link/image picker).
      - There's a MediaLibrary::getPageMediaLibraries method you can hook after to modify the array of available libraries.
      - You can switch between (default) select dropdowns or radio boxes in the module configuration of MediaLIbrary to choose libraries.
      Edit 10.10.2018:
      Version 0.1.3:
      - Dropped compatibility for ProcessWire legacy versions by adding namespaces
      - Allow deletion of libraries from the Media overview admin page
      - Added an option to hide media libraries from the page tree (optionally also for superusers)
    • By Robin S
      This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now.
      Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead.
      Add Template Enhancements
      A module for ProcessWire CMS/CMF. Adds some efficiency enhancements when adding or cloning templates via admin.

      Features
      Derive label from name when new template added: if you like to give each of your templates a label then this feature can save some time. The label can be added automatically when templates are added in admin, in admin/API, or not at all. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage
      Install the Add Template Enhancements module.
      Configure the module settings according to what suits you.
       
      https://github.com/Toutouwai/AddTemplateEnhancements
      https://modules.processwire.com/modules/add-template-enhancements/
    • By Mike Rockett
      As I mentioned in this issue, I've create a new textformatter for ParsedownExtraPlugin, which adds some oomph to your markdown.
      Repo: Parsedown Extra Plugin
      Unlike the built-in textformatter for Parsedown and Parsedown Extra, this should be used when you want to use Extra with additional configuration/customisation.
      Some examples:
      ### Test {.heading} - A [external link](https://google.com/){.google} with `google` as a class that opens in a new tab if the config property is set. - [Another link](/page){target=_blank} that opens in a new tab even though it isn't external. ```html .html <p>Test</p> ``` There's some config options available to you, such as setting attributes on all/external images and links, setting table and table-cell alignment classes, adjusting footnote classes and IDs, adding <code> attributes to their parent <pre> elements, and changing the <code> class if your syntax highlighter does not use language-*.
      I was thinking about adding the ability to make links open in a new tab by appending a plus to the link syntax, but only external links should be opening in a new tab anyway. Further, this would add extra, unnecessary processing time.
      Please let me know if you bump into any problems. ☺️
    • By Mike Rockett
      TextformatterTypographer (0.4.0 Beta)
      A ProcessWire wrapper for the awesome PHP Typography class, originally authored by KINGdesk LLC and enhanced by Peter Putzer in wp-Typography. Like Smartypants, it supercharges text fields with enhanced typography and typesetting, such as smart quotations, hyphenation in 59 languages, ellipses, copyright-, trade-, and service-marks, math symbols, and more.
      Learn more on my blog
      It's based on the PHP-Typography library found over at wp-Typography, which is more frequently updated and feature rich that its original by KINGdesk LLC.
      The module itself is fully configurable. I haven't done extensive testing, but there is nothing complex about this, and so I only envisage a typographical bug here and there, if any.
      Please do test it out and let me know what you think.
      Also note that I have indicated support for PW 2.8, but I haven't tested there as yet. This was built on PW 3.0.42/62.
    • By Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.50
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy!