-
-
Couldn't load subscription status.
- Fork 3.7k
[4.0] Debug bar #20380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Debug bar #20380
Conversation
| PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_EXCLUDE="Exclude" | ||
| PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_INCLUDE="Include" | ||
| PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_LABEL="Log Category Mode" | ||
| PLG_DEBUG_FIELD_LOG_DEPRECATED_CORE_DESC="Only relevant for Joomla! core developers" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont need this string, just remove it please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 😉
|
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. |
|
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. |
|
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). |
YES 😉 |
# Conflicts: # composer.lock
# Conflicts: # plugins/system/debug/debug.php
Still learning...
|
@ggppdk why don't you test it and see |
|
Ok , will find time to test this, regardless of including solution for #21131 |
|
Applying this to the current 4.0-dev branch fails on several levels. @elkuku can you fix the conflicts here? |
I think we can at least display the amount (using numbers) would this be helpful?
I've changed the color of the separator line to a beautiful blue and added some padding - what do you think/see?
That sounds like a nice idea but I'm afraid that if I perform this task it will look horrible - trust me 👅
I've added a
The first column is supposed to be the "extension" that is trying to load the language file(s) - Note the first line
Actually I noticed the same thing. As you can see in my screenshot this is different in admin and site...
So instead of waiting for #21457 being merged, I changed (J)Language here in this PR and also added the full stack trace. |
|
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. |
I made the query traces optional to avoid performance problems on "large" sites. so please make sure that you enabled them in plugin options. 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? |
|
@Hackwar |
|
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. |
|
Ready to Commit after required one more test. |
|
Thank you very much for this nice change! |
|
Very happy to see this go in. +1 for progress. |
|
🎉 |






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
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) 😉
Actual result
A not so beautiful looong thingy, fixed to the very bottom of the page.
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
DataCollectorclasses 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
Profile
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
Call stack

Duplicates filter

Explains

Deprecation logging
Language stuff
Should look as before, just more readable and compact.
Loaded
Untranslated
Errors
Mobile ready
Tested on a 5'' screen with fat fingers and it worked pretty well.
Happy debugging
=;)P.S.:
@todoThings that should be added (later)@all