We have mountains of Javascript. Somewhere in there, a redirect is happening that we don't want. How can you generically debug which code caused a redirect? A stack trace would be perfect.
Asked
Active
Viewed 6,716 times
19
-
you can use a packet sniffer such as fiddler2 to detect the redirect, and then step through your code line by line while watching for the redirect. – jbabey Apr 18 '12 at 16:55
2 Answers
3
Another person asked a similar question. Someone gave a helpful option in chrome debugging tools that you could try out. See link below.
Break javascript before an inline javascript redirect in Chrome
2
There's no easy way. You could do a mass search in your files for some words like "redirect", "window.location", "location" and the like.

Alex Turpin
- 46,743
- 23
- 113
- 145