Javascript tracing of cookie source
I have a server with tons of lines of Javascript and i need to check lines, which sets a new cookie.
All JS files are minified (variable names are abbreviated to one char etc.), so search it by the name of the cookie is almost impossible.
Is there any softwar开发者_JS百科e/debugger/browser/approach/whatever which is able to track the lines of code, which sets up some cookies?
I've tried to use a Chrome built-in webkit debugger which allows me to set up an "Event Listener Breakpoints". Unfortunately it cannot listen to setting new cookie.
If I had to do this I would first beautify the source code to make it more readable, then find any lines which set a cookie (e.g. by searching for the regex /(document)?\.cookie\s*=\s*/
), then trace the origin of the value which is assigned.
精彩评论