? ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
12 May 2018

This is a redo of #15472

Summary of Changes

The goal of this PR is to refactor the debug plugin (currently more than 2.000 lines of code) into smaller pieces.
An external library is used to display a floating debug bar. See a demo

Testing Instructions

Run

composer install
npm i

Turn on debug and/or language debug and play with the various options in plugin configuration.

Expected result

A beautiful floating debug toolbar (mobile ready) ?

bildschirmfoto_2018-05-12_16-19-09

Actual result

A not so beautiful looong thingy, fixed to the very bottom of the page.

bildschirmfoto_2018-05-12_16-20-57

Documentation Changes Required

Alot ?

Extended Description

While working on a Symfony project, I was amazed by the debug bar they offer and I thought about the old Joomla! plugin...

Integrating the Symfony bar would require a lot of dependencies from Symfony, probably including the Symfony Application class. While this would be amazing, I suspect that this is not gonna happen any time soon...

So I started playing with maximebf/debugbar which claims to be inspired by the Symfony debug bar, but for "non Symfony" projects ;)

This resulted in some DataCollector classes which, apart from collecting data, are responsible for bringing the collected data to something "serializable".

This data is then serialized and written to disk for later analysis. (Not implemented yet)

After a thousand words, here are some screens:
Note: Since the "old" code is still in place, you will see the "old" output as well as the "new " output in the screenshots.


Session

2017-04-18-121246_1366x768_scrot


Profile

2017-04-21-133031_1366x768_scrot


Queries

The database query tab features including
* Highlighted queries
* Timings and memory reports
* A (clickable) call stack with indication of the "caller" (somewhat experimental)
* Duplicated query check
* Duplicated queries can be filtered Note the filter buttons are at the lower right corner ?
* A button to "copy" the query to the clipboard

bildschirmfoto_2018-09-02_12-34-16

Call stack
joomla 4 debug bar -call-stack

Duplicates filter
menus items main menu joomla 4 debug bar administration

Explains
bildschirmfoto_2018-09-04_11-39-58


Deprecation logging

2017-04-21-171552_1366x768_scrot
bildschirmfoto_2018-05-12_16-37-52


Language stuff

Should look as before, just more readable and compact.

Loaded

bildschirmfoto_2018-09-02_11-08-43

Untranslated

bildschirmfoto_2018-09-02_11-09-44

Errors

bildschirmfoto_2018-09-02_11-10-42


Mobile ready

screenshot_20170426-010917

Tested on a 5'' screen with fat fingers and it worked pretty well.


Happy debugging =;)

P.S.: @todo Things that should be added (later)

  • Memory display on profile tab - Thanks @Hackwar
  • A lot of visual improvements to be implemented using modern CSS technioques - Thanks @all
avatar elkuku elkuku - open - 12 May 2018
avatar elkuku elkuku - change - 12 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 May 2018
Category Administration Language & Strings External Library Composer Change Libraries
avatar elkuku elkuku - change - 13 May 2018
Labels Added: ? ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2018
Category Administration Language & Strings External Library Composer Change Libraries Repository Administration Language & Strings External Library Composer Change Libraries
avatar laoneo
laoneo - comment - 14 May 2018

Does the query tab has duplicate query detection and can show the stack trace? That's two very useful features of the current debug plugin.

avatar mbabker
mbabker - comment - 14 May 2018

Yes it can highlight duplicate queries. I don't remember off hand if the debug bar natively supports collecting stack traces, but the Laravel package that extends this does have them so even if it's not a native capability it can be added in.

avatar mbabker
mbabker - comment - 14 May 2018

Actually, we couldn't use the existing database integrations in the main debug bar package anyway. That one only supports PDO, we have non-PDO drivers in our database API (MySQLi and SQL Server).

avatar elkuku
elkuku - comment - 14 May 2018

Does the query tab has duplicate query detection and can show the stack trace? That's two very useful features of the current debug plugin.

Currently only the executed queries are displayed in a custom tab. For the reasons Michael stated we can not use the provided db tab so... - no stack trace, timings, memory etc.
I'd like to propose adding a component that displays additional information like this - in the next PR ?

YES ?

avatar ggppdk
ggppdk - comment - 15 Jul 2018

@elkuku

hi, will this PR have solution for issue:
#21131

avatar brianteeman
brianteeman - comment - 15 Jul 2018

@ggppdk why don't you test it and see

avatar ggppdk
ggppdk - comment - 15 Jul 2018

Ok , will find time to test this, regardless of including solution for #21131

avatar Hackwar
Hackwar - comment - 16 Jul 2018

Applying this to the current 4.0-dev branch fails on several levels. @elkuku can you fix the conflicts here?

avatar elkuku
elkuku - comment - 19 Jul 2018

hi, will this PR have solution for issue:

e.g. will it speed up stuff?
At the current stage: no - because the "old" code processing db info is still in place - for reference.

My proposal would be to display only the executed queries in the debug bar and move the "extended information" (what we have currently) to a proper page that is displayed by a component - along with all the other information that we store about a request.
On the other hand - do we really need all the information or should we better rely on external tools for database profiling?

Yes things should definitely become faster.

I have not performed any testing on sites with "lots of" queries but I guess that you should note a difference.

can you fix the conflicts here?

Will do..

avatar elkuku
elkuku - comment - 19 Jul 2018

So... I managed to get this back to a workable state...

Apparently something has changed the way autoloading magic happens now so - I registered my namespace again by hand... - Maybe @wilsonge could help me out here again?

avatar roland-d
roland-d - comment - 27 Jul 2018

@elkuku Thank you for your work on this, it is looking very promising.

Here are my initial findings:

  1. When I click the info link, it opens a new tab with a 404 that the profiler component is not found.

image

I cannot find where I should install this component as Discover doesn't see it.

  1. I do not know if this is by design but the bars run through the text

image

  1. The queries start counting at 0 instead of 1

image

  1. In the queries we can no longer see if they took a long time or not, this makes it hard to find out which query is slow. We have this bar in the current debugger:

image

You can click on a position to jump to the query. This is something we should keep.

  1. Listing duplicate queries is useful too:

image

  1. In the list of loaded language files it would be great if the file links are clickable like in an XDebug trace. This allows the file to be opened in the IDE.

image

The link here goes to phpstorm://open?file=/usr/local/var/www/rsform/plugins/system/pwtseo/language/en-GB/en-GB.plg_system_pwtseo.ini&line=

  1. In the Untranslated part, it only shows partial filenames

image

  1. In your screenshot you have a Deprecated tab, I don't see that. What is needed to trigger that?

  2. Keep up the good work :)

avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2018
Category Administration Language & Strings External Library Composer Change Libraries Repository Administration Language & Strings External Library Composer Change Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2018
Category Administration Language & Strings External Library Composer Change Libraries Administration Language & Strings External Library Composer Change JavaScript Front End Plugins
avatar mbabker
mbabker - comment - 30 Jul 2018

I do not know if this is by design but the bars run through the text

Yes, that's the design. I use this same debug bar on the Joomla Framework website for local dev, see https://user-images.githubusercontent.com/368545/36637903-b2229e60-19ab-11e8-9b64-227b812f37f1.png for an example from there. Basically, the time it starts measuring timings for the timeline is the left edge of the window and the time it stops is the right edge, so the bar positioning is somewhat relative to when in the request the timing was captured (and as you can see in that screenshot the timings aren't restricted to a single path, you can start and stop timing measurements a bit more granularly and catch different steps in a "higher" level topic such as the sub-tasks performed by a controller).

avatar roland-d
roland-d - comment - 30 Jul 2018

@elkuku There are no new changes yet to test, correct?

avatar joomla-cms-bot joomla-cms-bot - change - 31 Jul 2018
Category Administration Language & Strings External Library Composer Change JavaScript Front End Plugins Administration Language & Strings JavaScript Repository External Library Composer Change Front End Plugins
avatar elkuku
elkuku - comment - 31 Jul 2018

Hello and sorry for the late reply. I had a little accident on my motor bike, broke my finger so I'm typing a little slow - please be patient ?

Let me respond @roland-d :

  1. This is not implemented yet (code exists only local). The idea is to display all the request informations with all the bells and whistles that we have on a dedicated page (a component output would be the Joonla! way I guess..).

  2. What Michael said..

  3. Yeah because I'm just dumping the array here - Will be pretified in 1.

  4. See 1.

  5. Where's 5.? ?

  6. See 1.

  7. I was looking into making those clickable, but I think we should leave this also for 1. - please ?

  8. That looks really bad you're right. On the other hand: If you look closely where the link points to you'll not want click on it...

  9. AHA excellent question *BigGrin* - There is a "hidden feature" called deprecation logging, I believe most devs are not aware of this...
    Please find the plugin setting and.. See my screenshot ;)
    bildschirmfoto_2018-07-31_11-31-28

  10. I'll do my best - Thanks!

On the other hand I removed all the vendor code, so code reviews may be possible now..

I've also modified the build.js file to copy the assets from the PHP package. This would obviously mean that you have to run composer install before npm install but I guess, since the projects "main" language is PHP, that should be the case anyway... may I ping @dgrammatiko @mbabker @wilsonge or any other dev for some suggestions here?

avatar elkuku elkuku - change - 31 Jul 2018
The description was changed
avatar elkuku elkuku - edited - 31 Jul 2018
avatar elkuku
elkuku - comment - 1 Aug 2018

Travis is green but the words Segmentation fault don't have a quite positive sound... link

avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2018
Category Administration Language & Strings External Library Composer Change JavaScript Front End Plugins Repository Administration Language & Strings JavaScript Repository Front End com_content External Library Composer Change Plugins
avatar elkuku elkuku - change - 3 Aug 2018
The description was changed
avatar elkuku elkuku - edited - 3 Aug 2018
avatar Hackwar
Hackwar - comment - 3 Aug 2018

Going to test this now, but I first glanced over the code of the PR and I was wondering why there is a debug model in com_content?

avatar Hackwar
Hackwar - comment - 3 Aug 2018

After merging this branch into my smart search changes: I really like this! The display of session data is great and the whole display of the debug data is ? Can I somehow help you guys or do you have all the code already locally and just need to clean it up?

avatar joomla-cms-bot joomla-cms-bot - change - 6 Aug 2018
Category Administration Language & Strings External Library Composer Change JavaScript Front End Plugins Repository com_content Administration Language & Strings JavaScript Repository External Library Composer Change Front End Plugins
avatar elkuku
elkuku - comment - 7 Aug 2018

Hi @Hackwar alles klar? ? first of all, thanks for your kind words. Very much appreciated.
Now - the debug model you discovered in com_content is part of a proposal that I currently can not find an appropriate place for, so I hacked it in com_content. I feel that introducing a new component like com_debug or something would be something that need more "fighting with the gate keepers".... So here is the deal:

  1. The current branch contains a cleanup of the debug plugin (That is: all HTML code removed, all data processing is done by proper classes, rendering on the current page is done in JavaScript)
  2. The removed code has been placed in HTML related classes and views in com_content in a separate branch here: https://github.com/elkuku/joomla-cms/tree/com_debug as a proposal and for testing.
    Functionality should be the same as in the "old" debug console, or even better (@roland-d Language errors are now displayed one link per error and with the correct line number ? )

Happy testing

avatar elkuku
elkuku - comment - 8 Aug 2018

System test failures don't seem related to the code changed here...

avatar elkuku
elkuku - comment - 10 Aug 2018

@roland-d there is a PR to fix the untranslated strings display. Maybe you have time to test #21457?

avatar roland-d
roland-d - comment - 10 Aug 2018

@elkuku Do we need the composer.lock in this commit? Because of this file git apply won't work.

avatar elkuku
elkuku - comment - 10 Aug 2018

Do we need the composer.lock in this commit

You mean here in this PR? I'd say yes, otherwise composer install won't work as expected?

avatar roland-d
roland-d - comment - 10 Aug 2018

Ok, I will test it in another way.

avatar elkuku
elkuku - comment - 11 Aug 2018

Ok, I will test it in another way.

If you get conflicts with the composer.lock file, accept "mine" ?

Meanwhile here are some notable changes:

  1. The database query tab has now some new features provided by the 3pd package - I just had to figure out how to use it properly..

    • Duplicated query check @laoneo
    • Timings and memory reports
    • Highlighted queries
    • A button to "copy" the query to the clipboard
      bildschirmfotoxxx
  2. The loaded language files are now clickable @roland-d ?

avatar elkuku elkuku - change - 11 Aug 2018
The description was changed
avatar elkuku elkuku - edited - 11 Aug 2018
avatar roland-d
roland-d - comment - 11 Aug 2018

@elkuku Thank you for the update. The clickable languages is not working for me. Here is what I see:
image

image

Seems like a parsing error or something?

As for the DB queries, looking nice especially that you can click the query to get it copied. I just wonder if we can be notified without a JS alert.

Another question is, can we filter so we can see which duplicate queries exist?

avatar elkuku
elkuku - comment - 11 Aug 2018

The clickable languages is not working for me

This happens if an "old" version of the js file is in use. Please make sure to run npm i and clear all your browser caches ?

looking nice especially that you can click the query to get it copied. I just wonder if we can be notified without a JS alert.

Unfortunately we can not modify (or even remove) this functionality without "forking" the source code - which I am very attempted to, just to implement the stack trace display...

can we filter so we can see which duplicate queries exist?

Same as above - you would have to group them first, display only one of the dupes etc.. Maybe you could add something to maximebf/php-debugbar#382

avatar roland-d
roland-d - comment - 13 Aug 2018

@elkuku I cleaned things up and it is looking much better now.

Unfortunately we can not modify (or even remove) this functionality without "forking" the source code - which I am very attempted to, just to implement the stack trace display...

I was playing around with the Nette framework and they have Tracy the debug bar. https://github.com/nette/tracy for more info. This is also very neat.

Maybe you could add something to maximebf/php-debugbar#382

I will have a look at it.

The following issue I still observe
image

That should be fixed by the other PR right?

Where in Joomla can you get those Deprecated notices to show up?

avatar elkuku
elkuku - comment - 13 Aug 2018

Another weekend, another round of features ?
First of all, I "forked" the sqlqueries widget to our code base to perform some hacking.
Currently added fatures:

  1. A (clickable) call stack with indication of the "caller" (somewhat experimental)
    joomla 4 debug bar -call-stack
  2. Duplicated queries can be filtered
    menus items main menu joomla 4 debug bar administration
    Note the filter buttons are at the lower right corner ?

NOTE for Re-testers please execute npm run update or npm i

@roland-d

I was playing around with the Nette framework and they have Tracy the debug bar.

I had a look at tracy before starting here but decided to use phpdebugbar for architectural reasons ?

The following issue I still observe

Yes the correct functionality depends on the other PR being merged - thanks for testing btw ?

Where in Joomla can you get those Deprecated notices to show up?

They are all over the place, especially the "core" deprecation, that's why I decided to "filter them... Do you mean you don't get any of them??

avatar elkuku elkuku - change - 13 Aug 2018
The description was changed
avatar elkuku elkuku - edited - 13 Aug 2018
avatar roland-d
roland-d - comment - 13 Aug 2018

@elkuku

Note the filter buttons are at the lower right corner
Awesome. I see for example Duplicate 1, let's say I have 30 duplicate queries. Do I get 30 buttons in that case? (assuming these are 30 unique duplicate queries).

They are all over the place, especially the "core" deprecation, that's why I decided to "filter them... Do you mean you don't get any of them??

Correct I don't get any of them.

image

Can we make those links clickable too?
avatar elkuku
elkuku - comment - 13 Aug 2018

Correct I don't get any of them.

Do you at least see the "Deprecated" Tab in the debug bar?
Are you sure you enabled Log Deprecated API in the plugin parameters as in my screenshot in #20380 (comment) ?

Do I get 30 buttons in that case? (assuming these are 30 unique duplicate queries).

How can a duplicated query be unique? ?
The duplicated queries are "grouped" so you will get a button for every "group"
E.g. for the screenshot you posted earlier #20380 (comment) at point 6. you would get three buttons.
BTW could you do a test with this example? That'd be cool ?

Can we make those links clickable too?

For now I guess that you should open the call stack and make sure that the "caller" is correct, not sure that this works 100% reliable.. - but nice idea, I'll have a look at this.

avatar roland-d
roland-d - comment - 13 Aug 2018

@elkuku

Are you sure you enabled Log Deprecated API in the plugin parameters as in my screenshot in #20380 (comment) ?

It was not enabled. I did look for it before but couldn't find it. The tabs are hard to see in J4. Now I see them all.

Log Executed Queries

This option was not set but I can see the queries. So I guess that was confusing as well.

BTW could you do a test with this example?

I will test this and update with the results

avatar roland-d
roland-d - comment - 13 Aug 2018

I set up 3 duplicate queries and here are the results of showing all duplicates

image

Duplicates 1 turned off

image

Duplicates 2 turned off

image

The current buttons feel a bit awkward as in I need to click so much. Something like a toggle all on/off would be nice. I could just toggle all off and then the ones I would like to see. What do you think of that?

avatar elkuku
elkuku - comment - 13 Aug 2018

The tabs are hard to see in J4

Fully agree ?

This option was not set but I can see the queries. So I guess that was confusing as well.

This one actually logs the queries to a file (I believe this has been disabled so the option is useless anyway - will check)

The current buttons feel a bit awkward as in I need to click so much

Yes, well, I believe if you have that much duplicated queries you should better check your code ?
Actually this is the standard behaviour which is also used to filter log messages.

Meanwhile I made the caller text clickable. Can you confirm those are correct? According to your screenshots you are performing db queries in a template file ?

avatar roland-d
roland-d - comment - 14 Aug 2018

@elkuku I tested the caller text clickable for queries and they work but there is a weird side-effect. Every time I click on the link it opens in PhpStorm as expected but it also opens a blank tab. This only happens with the links in the queries.

Actually this is the standard behaviour which is also used to filter log messages.

So we can't have a button to toggle them all on/off?

avatar elkuku
elkuku - comment - 14 Aug 2018

it also opens a blank tab

I think this should be fixed now - please test.
May I ask how you have set up those clickable links? What's your OS and browser?
I have to confess that this never worked reliable for me, e.g. currently I am on a linux box using chrome or firefox and the most "easy to setup" option was to define the xdebug link as http://localhost:63342/api/file/%f:%l which works since phpstorm listens on this port while it runs and you can do a lot of nifty things but - I guess the browser will always try to open a new page/tab :(

So we can't have a button to toggle them all on/off?

I didn't say we can't
It's "our" code so the only thing we need to implement a feature is to find somebody with some time to do it

BTW: You complained about the annoying alert message that appears when copying a query...
The code is now under "our control" can be found here https://github.com/joomla/joomla-cms/pull/20380/files#diff-704b78076b8b57b6b9b63fa76f3fd570R44 open for modification ?

avatar roland-d
roland-d - comment - 17 Aug 2018

@elkuku

It's "our" code so the only thing we need to implement a feature is to find somebody with some time to do it

Good to know, I will check when I have some time, the same goes for the alert :)

image

We have another caller here, can you make that clickable as well? The same goes for the Deprecated tab.

image

Is it possible to get a caller here?

An inconsistency I noticed is that I have no entries in the Log and Untranslated tab and no entries in the Errors tab. The log tab is completely empty but the Errors tab says
image

I think they should just be blank as the Log and Untranslated tab is if there is no issue.

image

The Info link takes me to http://joomlacms.test/index.php?option=com_content&view=debug&id=X862e7a4b7e8180b879610361840e5995 I am not sure what to expect from this but now it gives me a 404.

avatar elkuku
elkuku - comment - 24 Aug 2018

@roland-d

We have another caller here, can you make that clickable as well? The same goes for the Deprecated tab.

I am going to look into this but it will require a fair amount of work so I'm not sure if we should do it after (and only if) this gets merged...

is it possible to get a caller here?

No - Those are just "messages" with everything that is deprecated.

but the Errors tab says

Has been fixed - thanks!

The Info link takes me to

This is supposed to lead you to a page with extended information... The code is actually here: https://github.com/elkuku/joomla-cms/tree/com_debug

BTW I opened a PR regarding the language error display - If you have time to test #21840 that'd be cool.

Thanks for all your testing ?

avatar roland-d
roland-d - comment - 25 Aug 2018

@elkuku
image

I noticed now that these lines are ended with an ellipses but there is more than enough space on the line. Can we have the text just run to the end of the line?

image

Can we have a counter behind the number of loaded language files?

This is supposed to lead you to a page with extended information... The code is actually here:

Let me know when it is ready to test.

Thanks for all your testing ?

Thank you for the coding. I would love to see this go into 4.0. That will be a great help.

avatar elkuku
elkuku - comment - 27 Aug 2018

I noticed now that these lines are ended with an ellipses but there is more than enough space on the line. Can we have the text just run to the end of the line?

Your output will be different on a smaller screen - I'd leave this for now

Can we have a counter behind the number of loaded language files?

Done

Let me know when it is ready to test.

I think when this got merged I'll get into bringing this to a "testable" state...

avatar roland-d
roland-d - comment - 27 Aug 2018

@elkuku I had another look, this looks good to me. For me this is good enough to merge, we just need to remove the info link because that doesn't do anything. That can be added later once the component is ready.

avatar elkuku
elkuku - comment - 27 Aug 2018

we just need to remove the info link because that doesn't do anything.

Right - has been removed.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Aug 2018

when this got merged

@elkuku: should Status set be on "RTC"?

avatar laoneo
laoneo - comment - 28 Aug 2018

This should get another round of tests, before setting to RTC.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Aug 2018

Thanks for Info @laoneo that this Pull Request needs also 2 successfully Tests.

avatar brianteeman
brianteeman - comment - 28 Aug 2018

Thank you for this @elkuku it looks really good and I am sure it will become a great addition.

Would it be possible to

  • change the php logo with administrator/templates/atum/images/logo-blue.svg
  • add mysql version to the J! Info section
  • have some way of clearly identifying the language related parts - currently its not obvious until you click on them
    image
  • be consistent in the fonts and styling used between tabs.
    image
    image
avatar brianteeman
brianteeman - comment - 28 Aug 2018

Thanks for making those changes. I saw the @todo and thats fine for me - don't know about others

I was just testing a duplicate query issue and it looked like this debugger was giving a different number of queries on the control panel page than the current debugger???

avatar elkuku
elkuku - comment - 28 Aug 2018

change the php logo with administrator/templates/atum/images/logo-blue.svg

So today I learned how to embed an svg in a css file. It wasn't just copy&paste but involved some hacking (e.g. hex color codes are not supported...) but in the end there is a Joomla! logo
bildschirmfoto_2018-08-28_12-48-23

add mysql version to the J! Info section

Done, see screenshot above.
I am using the SysInfoModel from com_admin here (why is this class still not autoloadable with a dozen autoloaders in place?? ? ) so we have pretty much every information ready for display as in backend => sysinfo

have some way of clearly identifying the language related parts - currently its not obvious until you click on them

I looked into adding a tooltip at least but this doesn't seem to be supported. The other option would be to rename the tab title to make it clearer, but I feel that they might become pretty "long". Maybe we should use abbreviations like Lang Loaded and Lang Errors? - WDYT

be consistent in the fonts and styling used between tabs.

The Untranslated Language Strings (Should we really put this string in the title?...) tab will receive its "own tab" (and corresponding styling) after #21457 ?

avatar elkuku
elkuku - comment - 28 Aug 2018

I was just testing a duplicate query issue and it looked like this debugger was giving a different number of queries on the control panel page than the current debugger???

That shouldn't be possible since it is using the exact same data - thinking - do you mean the number of duplicates or the total number? both should be the same... need more info ?

avatar brianteeman
brianteeman - comment - 28 Aug 2018

I will send more info tomorrow. Not at my pc right now. For the SVG you can add colour to it with css

avatar brianteeman
brianteeman - comment - 29 Aug 2018

Clean install of J4 with multilingual sample data and testing administrator/index.php
With debug on it produced

28 Queries Logged 37.78 ms

4 duplicate found!
2 duplicates: #17  #20
2 duplicates: #40  #43

With this new debug on it produced

20 statements were executed, 2 of which were duplicates, 18 unique

avatar elkuku
elkuku - comment - 30 Aug 2018

Umm the only thing I can think of is that there are additional changes in
the 4.0 branch which are producing different queries.
I'll update the branch and do some testing later.

Brian Teeman notifications@github.com schrieb am Mi., 29. Aug. 2018,
06:30:

Clean install of J4 with multilingual sample data and testing
administrator/index.php
With debug on it produced

28 Queries Logged 37.78 ms

4 duplicate found!
2 duplicates: #17 #20
2 duplicates: #40 #43

With this new debug on it produced

20 statements were executed, 2 of which were duplicates, 18 unique


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20380 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACEukuAjMd7X9AGqjMYZoa3xo1GSzT7ks5uVntagaJpZM4T8kvb
.

avatar elkuku
elkuku - comment - 31 Aug 2018

Sorry yesterday was to short... I would be in favor not only to abolish this crazy DST thing but also to add some additional hours to every day so we can be more productive...

That said, here are my findings:
I checked out the latest from 4.0, installed the german language pack, installed ML sample data, sailed to admin/index.php and got - nothing ? no duplicated queries...

Then I switched to the debug-bar branch and - got some dupes:
bildschirmfoto_2018-08-31_13-23-02
Then I merged in the 4.0 branch and - no more dupes...

So I guess I was right with my previous assumption. IIRC there was a PR about duplicated queries merged recently - could you test once more please?

avatar Hackwar
Hackwar - comment - 31 Aug 2018

I tested this and this looks very good. I can't speak on the missing queries part, but what I'm missing is the used memory of the different parts in the Profile tab. Can you have a look there?

I also have my issues with the design. I guess it is mostly due to being accustomed to the current style of the debug bar. Right now the texts to me appear pretty much like a wall. Especially the queries are not easy to read for me. Maybe we can color the icons/buttons/action areas of each query in the Joomla colors? And have a stronger seperator between the queries?

avatar elkuku
elkuku - comment - 1 Sep 2018

Please run composer install and npm install

infograf768 notifications@github.com schrieb am Fr., 31. Aug. 2018, 23:53:

Class 'DebugBar\DebugBar' not found


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20380 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACEupIi3dtnAx78Czf24UBi9_mZ2npYks5uWhLNgaJpZM4T8kvb
.

avatar infograf768
infograf768 - comment - 1 Sep 2018

Yeah, I was in the wrong repository.
Had an error though. Had to type y

Updating joomla/test-system dev-4.0-dev (472c69a => 0548840):     The package has modified files:
    M src/drone-run.sh
    Discard changes [y,n,v,d,s,?]? y
avatar infograf768
infograf768 - comment - 1 Sep 2018

Needs some kind work. ?
UI is very confusing. Things are stuck to one another and hardly readable (font size, line height).

Here color instead of Loaded/Not Loaded (not good for colour blind people). Maybe using both would be better. Alsdo no need imho to repeat the name of the file with these 2 columns.

screen shot 2018-09-01 at 07 22 00

Here constants are not displayed fully.

screen shot 2018-09-01 at 07 22 14

NOTE: just found out a change in Loaded/Not Loaded ini files. Must have been for some times as it is the same in 3.8.x
When a language file does not exist in a language, it is rightfully tagged as Not Loaded, but if I remember well, some time ago, it would show nearby the en-GB equivalent file as loaded instead.

avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2018
Category Administration Language & Strings External Library Composer Change JavaScript Front End Plugins Repository Administration Language & Strings JavaScript Repository External Library Composer Change Libraries Front End Plugins
avatar elkuku elkuku - change - 2 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 2 Sep 2018
avatar elkuku elkuku - change - 2 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 2 Sep 2018
avatar elkuku
elkuku - comment - 2 Sep 2018

@Hackwar

what I'm missing is the used memory of the different parts in the Profile tab. Can you have a look there?

I think we can at least display the amount (using numbers) would this be helpful?

the queries are not easy to read for me

I've changed the color of the separator line to a beautiful blue and added some padding - what do you think/see?

bildschirmfoto_2018-09-02_12-34-16

Maybe we can color the icons/buttons/action areas of each query in the Joomla colors?

That sounds like a nice idea but I'm afraid that if I perform this task it will look horrible - trust me ?

@infograf768

Here color instead of Loaded/Not Loaded (not good for colour blind people). Maybe using both would be better.

I've added a + or a - sign accordingly - WDYT?

Alsdo no need imho to repeat the name of the file with these 2 columns.

The first column is supposed to be the "extension" that is trying to load the language file(s) - Note the first line joomla is loading the xx-XX.ini file ? I've also added a header to make this clearer. I believe this is nice for "grouping" the files.

if I remember well, some time ago, it would show nearby the en-GB equivalent file as loaded instead.

Actually I noticed the same thing. As you can see in my screenshot this is different in admin and site...

bildschirmfoto_2018-09-02_11-08-43

Here constants are not displayed fully.

So instead of waiting for #21457 being merged, I changed (J)Language here in this PR and also added the full stack trace.

bildschirmfoto_2018-09-02_11-09-44

avatar laoneo
laoneo - comment - 3 Sep 2018

I had a look on your pr and some parts are missing according to your description. For example the duplicates query or the call stack of a query.

avatar elkuku
elkuku - comment - 3 Sep 2018

@laoneo

some parts are missing according to your description. For example the duplicates query or the call stack of a query.

I made the query traces optional to avoid performance problems on "large" sites. so please make sure that you enabled them in plugin options.

plugins system debug j4 debugbar administration

Note: The "Query Types" option is currently not functional

As for the duplicated queries, that should work as announced - what output do you get / expect?

avatar elkuku
elkuku - comment - 4 Sep 2018

@Hackwar
I've updated the profiler tab to include memory marks - Could you check please?
bildschirmfoto_2018-09-04_08-21-30

avatar elkuku elkuku - change - 4 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 4 Sep 2018
avatar elkuku
elkuku - comment - 4 Sep 2018

Just a small update for possible testers... Support for query explains has been added.
bildschirmfoto_2018-09-04_11-39-58

avatar elkuku elkuku - change - 4 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 4 Sep 2018
avatar elkuku elkuku - change - 4 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 4 Sep 2018
avatar laoneo
laoneo - comment - 6 Sep 2018

Can we get one more test and then I would suggest we merge it and do finalize the other issues in their own pr's.

avatar roland-d
roland-d - comment - 8 Sep 2018

@elkuku Great, great work. Well done.
@laoneo Here is my second test again. The things is awesome works great.

I have some ideas for enhancements but let's do that in a new issues.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

Ready to Commit after required one more test.

avatar elkuku elkuku - change - 8 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 8 Sep 2018
avatar laoneo laoneo - change - 10 Sep 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-09-10 06:47:15
Closed_By laoneo
Labels Added: ?
avatar laoneo laoneo - close - 10 Sep 2018
avatar laoneo laoneo - merge - 10 Sep 2018
avatar laoneo
laoneo - comment - 10 Sep 2018

Thank you very much for this nice change!

avatar roland-d
roland-d - comment - 10 Sep 2018

Very happy to see this go in. +1 for progress.

avatar elkuku
elkuku - comment - 10 Sep 2018

?

Add a Comment

Login with GitHub to post a comment