Closed ypnos-web closed 8 years ago
Have you ever had a look at the (Firefox) development console, when you have installed DebugKit and do an AJAX call? :smirk_cat:
Or chrome developer toolbar :) For that matter. Both developer friendly browsers come with it almost out of the box and contain very powerful AJAX debugging tools.
Thanks for your comments, I use the chrome developer toolbar all the time and look at the network traffic to debug XHR responses. However am I missing an interaction between the Chrome debugging and debug_kit?
So naive question: Having debug_kit enable, how would I use the Chrome debugging to have a look at SQL querys?
You don't see something like this?
Ok so this is Firebug and not the built-in console. I installed Firebug. But the Fireburg console just stays empty, for whatever reason.
May be add:
// In AppController.php
App::uses('FireCake', 'DebugKit.Lib');
I am using CakePHP 3.x.
@ypnos-web DebugKit 3 already catches all ajax requests on the current view
Clicking on it will load the details for that request.
Yes it does! It didn't work before and I never realized it changed.
I still think what I propose would be useful (esp. the divided view with history vs the other tabs) but the need for it is not as imminent anymore.
Thanks for your patience.
If you have an idea on how to make the divided view work a pull request would be great. Closing this issue as the core ask (XHR debugging) already works.
For me, DebugKit is vital for debugging especially in the case of AJAX. As in theses cases I typically get the correct result, or just no result at all (
json_encode()
just fails).Now how do you debug AJAX requests via DebugKit? You need to reload the page and then use the History panel. So what I do, is having a second tab with an unrelated page, which I refresh after doing some troublesome XHR requests, then open up the toolbar again, go to History, select the right request, then go to the other panels.
I suggest the following functionality which would be a tremendous help to me:
Example scenario: I am adding functionality to my finder that causes no data being delivered. I open the DebugKit page in a secondary window/tab and select the ORM tab. Whenever I change the finder code, I trigger a new AJAX request. I can go through the different requests in the History panel and see how the generated SQL changes. Another example scenario: Working on performance optimization and keeping the Timer tab open.
Obviously this can also improve the workflow for regular page visits.