Created
July 23, 2013 08:53
-
-
Save joostdevries/6060936 to your computer and use it in GitHub Desktop.
Using the werkzeug debugger if you're testing AJAX calls to your API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).ajaxError(function(evt, evtData) { | |
if(evtData && ('responseText' in evtData)) { | |
var debuggerWindow = window.open('about:blank', 'debuggerWindow'); | |
debuggerWindow.document.open(); | |
debuggerWindow.document.write(evtData.responseText); | |
debuggerWindow.document.close(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment