Note that there are some explanatory texts on larger screens.

plurals
  1. PODebugging ajax calls on CakePHP 2 with DebugKit, Firebug et al
    text
    copied!<p>I have a CakePHP 2 app with DebugKit installed. It is working fine and I get the memory usage and processing time in the "Timing" toolbar for each page I load.</p> <p>What I also want to be able to do is get memory usage and processing times for ajax requests after the page has loaded. I am aware that I can access previous ajax requests using the "History" button in the DebugKit Toolbar, but this is doesn't really help when I want to click around the page, firing ajax requests and get instant debugging information for them.</p> <p>So, I did some searching and I found that I could use Firebug + FirePHP in Firefox along with the FirePHP and FireCake libraries in my app and get all of DebugKit's stats on a per-ajax-request basis. This sounds perfect and exactly what I want to do.</p> <p>Unfortunately, I can't seem to get it to work. I could only find one tutorial on the matter at <a href="http://someguyjeremy.com/blog/using-firephp-to-debug-your-cakephp-app" rel="nofollow">http://someguyjeremy.com/blog/using-firephp-to-debug-your-cakephp-app</a></p> <p>I have done everything that tutorial mentions and Cake gives me no errors at all. However, unless I am missing something, I don't see where in Firebug the debug info is being displayed, if indeed it is even being fed to Firebug in the first place.</p> <p>My config:</p> <p><strong>Cake Version:</strong> 2.2.4</p> <p><strong>Firefox Version:</strong> 17.0.1</p> <p><strong>Firebug Version:</strong> tried with 1.11.1 and 1.9.0</p> <p><strong>FirePHP Version:</strong> 0.7.1</p> <p><strong>DebugKit Version:</strong> 2.2.0 (latest master branch)</p> <p><strong>UPDATE</strong></p> <p>It appears to work perfectly for Ajax requests that do not end in .json and, therefore, are not being picked up by the <code>Router::parseExtensions('json');</code> I have in routes.php.</p> <p>I took out <code>Router::parseExtensions('json');</code> and changed my Ajax request to go for my <code>filter</code> action directly instead of calling it <code>filter.json</code> and Cake serves all of the FireBug headers. Unfortunately, I can't use it like this because JQuery needs the content type to be application.json.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload