Jump to content
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      Images can be manipulated like native ProcessWire images (resizing, cropping etc.) Image names are fully searchable through the API Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message to help you edit those pages and remove references there before you can finally delete the image. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Choose whether you want to include child pages of page from step 2 to supply images Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...