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 Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By horst
      Croppable Image 3
      for PW 3.0.20+
      Module Version 1.1.16
      Sponsored by http://dreikon.de/, many thanks Timo & Niko!
      You can get it in the modules directory!
      Please refer to the readme on github for instructions.
       
      -------------------------------------------------------------------------
       
      Updating from prior versions:
       
      Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step:
      In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates.
      -------------------------------------------------------------------------
       
      For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
       
      -------------------------------------------------------------------------
       
    • By MoritzLost
      UPDATE: I have published a stable version of this module!
      Discussion thread:
      Github: https://github.com/MoritzLost/TextformatterPageTitleLinks
      ---
      Hello there,
      I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution 🙂
      It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright 😅
      You can download the module from Github:
      https://github.com/MoritzLost/TextformatterPageTitleLinks
      There's some more information in the readme as well.
      Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers.
    • By blad
      Hi guys!
      I just uploaded a module to explore files based on elFinder. By default it will show the "Files" folder.
      Screenshots:

      Video:
       
      To do:
       More options To fix:
       The function of rotating or scaling an image fails  Image editors V 1.01 (view issue)
      Fixed the bug working with the Multi-Language support ( translation of folders ). Fixed the name of elfinder.en  Github:
      https://github.com/LuisSantiago/ProcessElFinder/
      I hope you like it.
    • By BitPoet
      I'm really in love with FormBuilder, but the one thing missing to match all my end users' expectations were repeatable field groups. Think repeaters, in ProcessWire terms. Our primary application of PW is our corporate intranet, so "lines" of fields are quite common in the forms I build. We have all kinds of request forms where the information for a varying number of colleagues needs to be entered (from meal order to flight booking request) and where it is simply impractical to send a form for each, and I don't want to clutter my forms with multiple instances of fields that may only get used ten percent of the time.
      That's why I started to build FormBuilderMultiplier (link to GitHub).
      What it does:
      Adds an option to make a regular Fieldgroup repeatable Lets you limit the number of instances of a Fieldgroup on the form Adds an "Add row" button the form that adds another instance of the Fieldgroup's fields Adds a counter suffix at the end of every affected field's label Stores the entered values just like regular fields Makes the entered values available in preview and email notifications Supports most text based fields, textareas and selects (really, I haven't had enough time to test all the available choices yet) What it doesn't do (yet):
      Support saving to ProcessWire pages (i.e. real Repeaters) I haven't tested all the validation stuff, Date/Time inputs etc. yet, but since I'm utterly swamped with other stuff at work, I didn't want to wait until I have it polished. Any feedback is welcome. There might also be some issues with different output frameworks that I haven't encountered yet. The forms I work with mostly use UIKit.
      Status:
      Still alpha, so test well before using it in the field.
      Known issues:
      When rows are added, the form's iframe needs to be resized, which isn't completely clean yet.
      How it works:
      The Fieldgroup settings are added through regular hooks, as is the logic that adds the necessary field copies for processing the form and displaying previews.
      "Multiplied" field instances are suffixed with _NUM, where NUM is an incremental integer starting from 1. So if you have add two fields named "surname" and "givenname" to a fieldgroup and check the "multiply" checkbox, the form will initially have "surname_1" and "givenname_1" field (I'm still considering changing that to make the risk to shoot oneself into the foot by having a regular "surname_1" field somewhere else in the form less likely).
      When a "row" is added, the first row is cloned through JS and the counter in the fields' IDs, names and "for" attributes as well as the counter in the label are incremented before appending the copies to the Fieldset container in the form.
      To keep backend and frontend in sync, a hidden field named [name of the fieldset]__multiplier_rows is added to the form. Both the backend and the frontend script use this to store and retrieve the number of "rows".
      ToDo:
      Naturally, add the option to store the data in real repeaters when saving to pages. Do a lot of testing (and likely fixing). Make a few things (like the "Add row" button label etc.) configurable in field(set) context. Add a smooth API to retrieve the multiplied values as WireArrays. The mandatory moving screenshot: