php-debugbar icon indicating copy to clipboard operation
php-debugbar copied to clipboard

Ajax Pdo collecting with filestorage don't display in debugbar

Open lolo54000 opened this issue 8 years ago • 0 comments

Hello

I'm testing to use debugbar with ajax call I just use php no framework.

In my index.php I call my ajax files and I display the result and my debugbar. In my ajax file I do a query with pdo debugbar collector and I store the result in a debugbar filestorage.

If I open the json file create in my filestorage I have a pdo section "pdo": { "nb_statements": 1, "nb_failed_statements": 0, "accumulated_duration": 0.00050091743469238, "memory_usage": 1464, "peak_memory_usage": 874976, "statements": [{ "sql": "select top 10 * from user", "row_count": 0, "stmt_id": null, "prepared_stmt": "select top 10 * from user", "params": {}, "duration": 0.00050091743469238, "duration_str": "501\u03bcs", "memory": 1464, "memory_str": "1.43KB", "end_memory": 874976, "end_memory_str": "854.47KB", "is_success": true, "error_code": 0, "error_message": "", "connection": "intra-db" }],

When I open this file In my debug bar with an open handler ($renderer->setOpenHandlerUrl('open.php');) I can read all section of my file storage but not the pdo section !!!

How must I do to display the pdo section of a filestorage in my debugbar?

My open.php file :

handle(); where boostrap is the file of https://github.com/maximebf/php-debugbar/tree/master/demo Thank you for your help Loic

lolo54000 avatar Dec 02 '17 14:12 lolo54000