Jump to content

Tracy Debugger


adrian

Recommended Posts

Yes, I thought about passing the Validator entirely to JavaScript. There could be even an "on demand" mode that validates only on clicking on the panel (just an idea).

Apart from the issue I had on one server Tracy loads fast here. I have PHP 7 on most servers and sometimes I get 200-250 ms speed, at least that's what Tracy shows. When I revert PHP version to 5.4 or 5.6, speed increases to 500 and 700 ms. I have to add that I use only a few panels.

  • Like 2
Link to comment
Share on other sites

There could be even an "on demand" mode that validates only on clicking on the panel (just an idea).

If we keep the Validator panel off and enable it temporarily with the Once option, we get a similar - though not exactly the same - effect, if I'm not mistaken. When we decide to use it more than once, now we can just choose Sticky.  When you switch to Sticky, you do not have to click anywhere anymore just to validate the page once more. To me it looks like a good workflow. An on-demand validation would stay on-demand, but what if we are in a long session of fixing some validation issues? In that case we would need another option to switch between on-demand and automatic in order to save some time and clicks.

Another issue:

The Once and Sticky button features might need some additional polish: currently there is no way to tell apart Sticky and the standard default state, after a while we cannot remember the reason why those checkboxes are on or off. Some sort of color coding might be good to implement to solve this. Say, green is used to indicate the temporary Sticky state. Or maybe an icon (::after selector probably?) An icon is more descriptive, so probably a better solution.

  • Like 1
Link to comment
Share on other sites

If we keep the Validator panel off and enable it temporarily with the Once option, we get a similar - though not exactly the same - effect, if I'm not mistaken. When we decide to use it more than once, now we can just choose Sticky.  When you switch to Sticky, you do not have to click anywhere anymore just to validate the page once more. To me it looks like a good workflow. An on-demand validation would stay on-demand, but what if we are in a long session of fixing some validation issues? In that case we would need another option to switch between on-demand and automatic in order to save some time and clicks.

I think I mostly agree with you here - the downside to the current option is that requires a page reload (when you click Once or Sticky) to load the Validator panel. An AJAX option would be much quicker - you could have the panel always loaded with no content and a button to trigger the validation request. I am not really sure how much this really matters though - if you decide to do a "Once" validation and you see errors, you'll probably then "Sticky" it until you have things fixed, then "Reset". I think in the end I probably agree with you and won't worry about changing things at the moment :)

Another issue:

The Once and Sticky button features might need some additional polish: currently there is no way to tell apart Sticky and the standard default state, after a while we cannot remember the reason why those checkboxes are on or off. Some sort of color coding might be good to implement to solve this. Say, green is used to indicate the temporary Sticky state. Or maybe an icon (::after selector probably?) An icon is more descriptive, so probably a better solution.

This sounds useful - I am thinking just one icon positioned after each of the default panels so you know what is the set that is defined in the main module config settings. 

I would actually like your thoughts on the current behaviour regarding making some "Sticky" changes and then adding an additional panel "Once" - currently any time you do a "Once" it clears the previous "Sticky" options which I don't think it very helpful or expected. I think I will change this so that on the next reload, the states is restored to the last sticky state, rather than the default state - sound ok?

  • Like 1
Link to comment
Share on other sites

I would actually like your thoughts on the current behaviour regarding making some "Sticky" changes and then adding an additional panel "Once"...

Additional panel? Well, we already have quite a few of them. Isn't it possible to manage all this in the current panel? Maybe I'm missing something, but it would also be a bit confusing to manage related panels. Currently all panels are completely unrelated, which is probably the expected behavior.

...currently any time you do a "Once" it clears the previous "Sticky" options which I don't think it very helpful or expected. I think I will change this so that on the next reload, the states is restored to the last sticky state, rather than the default state - sound ok?

Sounds OK! Once we can tell those states apart, we will also be able to visualize it :D

Link to comment
Share on other sites

Additional panel? Well, we already have quite a few of them. Isn't it possible to manage all this in the current panel? Maybe I'm missing something, but it would also be a bit confusing to manage related panels. Currently all panels are completely unrelated, which is probably the expected behavior.

Sorry - poor wording on my part - I am talking about enabling an extra panel (or disabling one) using the "Once" option - hopefully that sentence makes more sense like that :)

Link to comment
Share on other sites

but I'm just an English learner

You Europeans make me smile - your English is probably better than mine :)

Latest version comes with a few general tweaks/fixes, but the most significant are related to the Selector panel based on our recent discussions.

It now returns to the "Sticky" state when you reload after a "Once" change (previously, it returned to default from the config settings).

There are also now icons indicating if:

  • the panel is set in the default list in the module config settings ("Tick" icon),
  • the state of the panel is different for the current view, ie you have made a "Once" change (number "1" icon)

In the following example, you can see that:

  • Debug Mode is disabled. Default is enabled (checkbox icon). There is no "1" icon so it is a Sticky setting.
  • ProcesswireInfo is disabled. Default is enabled (checkbox icon), There is a "1" icon so you know it's a "Once" only setting.
  • Validator is enabled. Default is disabled (no checkbox icon). There is a "1" icon so you know it's a "Once" only setting. 

post-985-0-77227200-1462826153_thumb.png

Hope that all makes sense and provides a quick visual of what the current panel settings are and what they will be when the page is reloaded.

  • Like 2
Link to comment
Share on other sites

 your English is probably better than mine

Well I guess you have no idea how much effort is put  even in simpler replies if you're not a native English speaker :)

  • Like 5
Link to comment
Share on other sites

Well I guess you have no idea how much effort is put  even in simpler replies if you're not a native English speaker :)

Sorry if that came across the wrong way - I am just always in awe of how great you guys are at being multilingual. It was meant to be a compliment!

I know a little travel Spanish and it seems so hard to get beyond that.

I also remember a teenage German asking me questions about English grammar and I didn't know the answer - I think unfortunately those of us who are from English speaking countries typically don't get the same grounding in languages and their rules - we just know what sounds right without knowing why. That's why in some ways you probably do have a better grasp of English and how it works. And it's such a bastard language with all these weird exceptions to rules - I don't know how anyone ever learns it!

  • Like 2
Link to comment
Share on other sites

I was just trying to be funny here that's why the smiley. But it's true that it's often hard to put things right, especially because a wrong wording or term can easily modify the meaning.

Otoh you "natives" :) seem to have a good sense for understanding malformed posts :)

  • Like 2
Link to comment
Share on other sites

A big thumbs up! You did it again Adrian! :)
One teeny-weeny question though: can we have some color coding for the icons please? :P You see, they are rather small (we want to save space, so it is expected), however the tick mark is just a thin line, the number one is also "just a thin tick mark" transformed a little bit, so my I eyes+brain are a bit stretched to their limits when differentiating them.

Speaking of languages: do not expect me to know too much about Hungarian grammar either... When we (try to) learn a language from books, we are forced to learn some grammar too, however, when growing up with it, we do not need to elaborate too much on the inner workings, so only a few of us do so. BTW: if you have the time, you can speed up your learning process by using this: http://ankisrs.net (you might have already tested it, I am currently in the process of building my very first German cards.)

  • Like 1
Link to comment
Share on other sites

A big thumbs up! You did it again Adrian! :)

One teeny-weeny question though: can we have some color coding for the icons please? :P You see, they are rather small (we want to save space, so it is expected), however the tick mark is just a thin line, the number one is also "just a thin tick mark" transformed a little bit, so my I eyes+brain are a bit stretched to their limits when differentiating them.

Happy to help make this easier to see, but firstly I am wondering if what you are seeing on your setup matches the screenshot above, or if it's different - perhaps there is some CSS at play again that is altering them? If they are the same, perhaps you wouldn't mind playing with them till you're happy with how they look - would save us potentially going back and forward over several different versions. They are both SVG (https://github.com/adrianbj/TracyDebugger/blob/master/PanelSelectorPanel.inc#L124), so it will be easy for you to change the size and color.

Speaking of languages: do not expect me to know too much about Hungarian grammar either... When we (try to) learn a language from books, we are forced to learn some grammar too, however, when growing up with it, we do not need to elaborate too much on the inner workings, so only a few of us do so. BTW: if you have the time, you can speed up your learning process by using this: http://ankisrs.net (you might have already tested it, I am currently in the process of building my very first German cards.)

Thanks for the link - I hadn't seen that - looks pretty cool actually - I'll definitely give it a go.

  • Like 1
Link to comment
Share on other sites

Happy to help make this easier to see, but firstly I am wondering if what you are seeing on your setup matches the screenshot above, or if it's different - perhaps there is some CSS at play again that is altering them? If they are the same, perhaps you wouldn't mind playing with them till you're happy with how they look - would save us potentially going back and forward over several different versions. They are both SVG (https://github.com/adrianbj/TracyDebugger/blob/master/PanelSelectorPanel.inc#L124), so it will be easy for you to change the size and color.

I would just use fill="green" for Default, fill="orange" for Once (if you prefer the "PW magenta", why not...). I opened the panel in each of my three browsers (Chrome, Firefox and Safari) and it looks quite similar to yours:

post-4029-0-28949100-1462861987_thumb.gi

  • Like 1
Link to comment
Share on other sites

Thanks - I have made those changes. I also upped the size of the icons a couple of pixels which should also help a little.

One more thing I forgot to ask: how can new "users" figure out the what these icons mean?

I played around with adding a legend to the panel, but it just kind of looked messy and took up too much extra space, so I just added tooltips to the icons - hopefully this helps a little.

  • Like 2
Link to comment
Share on other sites

Hi, I have just checked it out. May I suggest changes to the <title>s?

Default panel from module config settings
to something like:
turned on in module's settings

"config settings" is sort of word repetition, PW labels the buttons in question "Settings" so it maybe enough. I also tried to use the same point of view in the case of both titles: why one option is turned on or off, so the messages are consistent.

Panel status changed once
to something like:
turned on "Once"
or maybe:
turned on by "Once"
?

I also tried to be short :)

The enlarged icons are a bit easier to recognize and probably about the largest in size we can use. Thank you!

  • Like 1
Link to comment
Share on other sites

Thanks - I changed them to be close to what you suggested.

The latest version also add the generation times for each panel to the selector panel so you can quickly see if one is very slow.

I have also included some CSS tweaks and some other small bug fixes that I discovered with the validator and users panel.

  • Like 1
Link to comment
Share on other sites

Just saw that the Validator panel is also loaded in the admin, perhaps it's not really needed there.

It shouldn't be: https://github.com/adrianbj/TracyDebugger/blob/master/TracyDebugger.module#L263

Any ideas why that check is failing for you? 

The Validator and Variables panels are both supposed to be disabled in the admin and are for me.

There are however showing checked in the Selector Panel - working on that now. Actually not sure I can do much about this - don't want to maintain separate cookies for frontend and admin and if it's unchecked when in the admin and you click once or sticky, it would make that change for the frontend as well. I don't think this is a big deal so will leave for the moment.

Link to comment
Share on other sites

False alarm: I had version 1.3.8. After update it's all fine.

For me showing these checked on Selector Panel is no problem. Though you could solve it by CSS, the admin has "template-admin" class on the body, e.g. hide it.

Link to comment
Share on other sites

Another notice, hopefully more to the point :) When "Loggin in production mode" is on, Google PageSpeed (and others) report much worse speed scores. I get about 85 vs 95 on the site I'm currently working. This is logical but maybe this could be noted somewhere.

Link to comment
Share on other sites

Though you could solve it by CSS, the admin has "template-admin" class on the body, e.g. hide it.

Good idea - hiding it might be a decent option - I'll have a think about it.

Another notice, hopefully more to the point :) When "Loggin in production mode" is on, Google PageSpeed (and others) report much worse speed scores. I get about 85 vs 95 on the site I'm currently working. This is logical but maybe this could be noted somewhere.

I am surprised about this - I am not sure why unless you are using a browser extension. Surely with the online version of any of these tools they won't have any Debugger bar code loaded. Am I missing something obvious?

I can imagine that having Tracy running with "Allow Logging in Production Mode" enabled might make a very minor change to scores, but I would expect it to be insigificant.

  • Like 1
Link to comment
Share on other sites

Hi Adrian,

I'm trying to track down a mysterious issue that affects Tracy Debugger; i have a set of pages all using the same template, and there are a set of 5 of these pages that all exhibit the same problem, the tracy bar doesn't load and i get one of these errors:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /home/user/public_html/wire/core/Page.php on line 1611
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/user/public_html/wire/core/Wire.php on line 1048

For all of the other 176 siblings, everything works fine...

This doesn't affect the live site at all, but there does seem to be something odd going on between tracy and these particular pages on the front end, as tracy loads fine on the PW page editor for these pages...

Link to comment
Share on other sites

Hey Macrura,

What version of TracyDebugger are you running? Also, does it make any difference if you switch from the master to stable version of the Tracy core (in the module config settings).

Also, what happens if you disable all the panels in the module settings. If it works with all panels disabled, please try enabling one at a time. I have a feeling it might be the PW Info panel - any chance you have a large Profields Table on these pages - I just came across an issue with this myself today - the PWInfo panel gets a LOT of data loaded in this situation. I need to figure out a way around this.

Thanks for helping to figure this out.

  • Like 1
Link to comment
Share on other sites

Hi Adrian, i tried both master and dev, and also tried disabling all panels, but the error persists either way;

These pages do have multiple tables, however the ones that exhibit the error are actually much less populated than some of the pages that have those tables populated.

The tables themselves are only 3-5 columns and max 10 rows.

Link to comment
Share on other sites

  • adrian pinned and locked this topic
  • adrian unpinned and pinned this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...