title: How do I debug a jQuery Ajax request?
body: <p>My code is:</p>
  
  <pre><code>var test = "it isn't working";
  var response = $.ajax({
      type: 'GET',
      url: 'jquerydemo.php', //This is in the same site as the page calling this request, so it's not a same-domain error.
      success: function(){
              test = "it's working";
          },
      error: function(){
              alert("Error detected");
          }
   }).responseText;
  alert(test);
  </code></pre>
  
  <p>I tested the status code and it came out to a 200 and the error function never goes off, but neither does the success function.  Like I said in my comment, it isn't a same-origin policy error.  It just stays saying "it isn't working".  What's going on here?</p>