What I personally did in this case is to use an HTTP proxy server, which can deliver a request or response βon holdβ. For example. Burp Proxy (this is a security tool, but it is great for debugging purposes)
Launch the proxy server and configure the browser to use it. Go to the page where roque requests occur and activate intercept requests (this can take some time, because Burp Proxy can be quite a complex tool).
Now perform the user action, if everything goes well, the proxy intercepts it and waits for confirmation to pass. Do it. Then you will probably see the second request, which will also be intercepted by the proxy server. Don't let this go, but instead switch to Firebug and pause the debugger. Hope you can see where it comes from. Edit: secondly, the asynchronous nature of AJAX probably means that you cannot see what the exact location is with this method anyway ... :(
At the very least, you can also configure it to intercept responses. Both requests and responses can be edited on the fly, which is great for experimenting and debugging and can help narrow down the problem.
Arjan tijms
source share