jr.
jr.

Reputation: 1739

Firefox JavaScript debugger: wrong cookie value sent

I'm running Firefox 36.0.4 on Windows 7 32-bit. I've diabled all add-ons, extensions and user scripts before retesting this.

I'd like to step through JavaScript code that is served up in a <script> tag in the HTML document being produced by a Java (Tomcat) web server.

Unfortunately, when I select the HTML document under Debugger > Sources, the source of the page returns to the login page of the application - it appears that session information is not being used to request the source.

I stepped through the server-side code and found that the correct session cookie values were being sent for the real page request and some AJAX requests sent by the page. However, when I tried to load the page source in the JavaScript debugger, I found that an incorrect session cookie was being sent by the JavaScript debugger.

I can replicate this behaviour in other webapps, not just my own. For example, Stack Overflow: stack overflow bug screenshot

Is this a configuration issue, or a bug in the Firefox Developer Tools?

Upvotes: 1

Views: 708

Answers (2)

jr.
jr.

Reputation: 1739

After reviewing canuckistani's answer, I downloaded Firefox Developer Edition. Seemingly, the problem was fixed.

Five minutes in, I became sick of being asked whether to remember passwords and having to manually clear session cookies (I prefer being able to do it by simply closing the browser) - it makes testing easier.

As per usual, I went to Options > Privacy > History to disable this behaviour, by setting the value to Never remember history.

privacy settings screenshot

Changing this setting requires the browser to restart. However, upon restarting, I once again saw the same erroneous behaviour - the wrong session cookie was being sent to the web application again.

The workaround here is to not use the Never remember history setting. I have filed a bug report at Mozilla.org Bugzilla.

Upvotes: 0

therealjeffg
therealjeffg

Reputation: 5830

I can't reproduce your problem using StackOverflow as an example, at least in Firefox Developer Edition ( currently version 38 ):

One thing that might help - try disabling the cache while the toolbox is open - this setting is in the developer tools setting panel ( click on the 'gear' icon at the top right of the toolbox ):

Upvotes: 1

Related Questions