Target: version 4.5
SQL debugging is a feature that helps developers debug SQL queries generated by phpMyAdmin and is enabled by $cfg['DBG']['sql'] configuration. As suggested by Marc Delisle, it would be better to integrate SQL debugging to the new console (to be) introduced in version 4.3
Diff:
So basically this feature wants to include the information shown at the bottom of the page when $cfg['DBG']['sql'] = true , as a part of sql debugging process (like query executed, number of times it is executed, time taken etc.) to be included dynamically in the newer console in PMA window?
Am I right?
Correct.
Probably in another tab to distinguish them from user issued queries.
There is one doubt.
In DatabaseInerface.class.php , the function _dbgQuery() is defined as private . Since this is the place where debugging information is generated for all the queries, how would I be able to use it in console class to generate debug information there?
I believe it's premature to discuss the implementation right now, as this would be part of the GSoC proposal(s).
Ok. I will include my implementation ideas in my proposal.
On Mar 19, 2015 6:28 PM, "Marc Delisle" lem9@users.sf.net wrote:
Related
Feature Requests: #1551
What does it actually mean by integrating SQL debugging in console? Show debug info in console somehow, as Madhura pointed, in new tab or something?
Nisarg,
I assume that you are familiar with the current way SQL debugging is displayed: it's just appended at the bottom of page. Also, it's difficult to interpret. Yes, it could be integrated in a new tab of the console, but I expect some creativity on your part to also improve the way it's displayed. As an example, I don't always want to see the trace for each query, so there should be various levels of display details.
Maybe,
1. Ability to see individual queries or group them when there are multiple executions of the same SQL
2. Ability the show/hide trace
3. Ability to sort by execution order, execution time, no. of calls etc.
4. A quick search.
Madhura,
this is fine but I am wondering: we are still talking about all the queries generated by one action, right? Currently the SQL debugger is limited to that and I am fine with this. We don't plan to store this debugging info permanently, right?
Yes, for queries generated by one action. I don't think we need to over complicate this feature request.
I'm not sure about the usefulness of search. On an average, there is about 15 queries. Searching in these 15-20 queries doesn't make much sense to me. Thoughts?
I share Nisarg's opinion on this.
Any suggestions for sorting UI? How/Where to show buttons(or something else) for sorting queries?
What I initially had in mind was a sortable table. Something like the network tab of Chrome console. I don't know whether that is feasible though.
It doesn't fit in how the console debugging is right now. Anyway, I've implemented something in https://github.com/phpmyadmin/phpmyadmin/pull/1746. I am not so happy about it, but looks like the best option. Suggestions?