Debugging ajax calls/requests

In case ajax calls are making a trouble and developer needs more information about what is happening regarding:

  • which js code is calling a request
  • what URL is called
  • what is the response status
  • what is the response format

Crome developer console can help a lot. For example, in case we need to check what is happening on Drupal autocomplete changes you need to do following steps:

  1. Open a page with autocomplete field
  2. Open Chrome developers tools
  3. Click tab "Network"
  4. Clean all current records by clicking icon "Clear" in top left corner
  5. Start typing autocomplete data
  6. Check what is displayed in dev tools.