Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I can't reliably copy cookie and header values from the javascript debugger

  • 10 replies
  • 1 has this problem
  • 1 view
  • Last reply by cor-el

more options

This may not be the best place to ask this, but I can't find a more appropriate place.

I'm currently on Firefox 67.0.4.

I'm using the javascript debugger in Web Developer Tools to debug problems in our applications. I often need to copy cookie or header values out of the network panel (or wherever), and I find it is very hard to do this reliably. When I try to use the mouse to select a value, it often highlights more than I'm selecting, and then when I press Ctrl-c and then paste it into another destination, it often pastes my previous clipboard value, which indicates that it didn't copy anything.

Sometimes it seems like the only strategy that sometimes works is to only copy "most" of the string, leaving off the first or last character, and simply remember what that character is, and manually add it when I paste the value.

I often have to attempt the copy several times before it actually works.

This may not be the best place to ask this, but I can't find a more appropriate place. I'm currently on Firefox 67.0.4. I'm using the javascript debugger in Web Developer Tools to debug problems in our applications. I often need to copy cookie or header values out of the network panel (or wherever), and I find it is very hard to do this reliably. When I try to use the mouse to select a value, it often highlights more than I'm selecting, and then when I press Ctrl-c and then paste it into another destination, it often pastes my previous clipboard value, which indicates that it didn't copy anything. Sometimes it seems like the only strategy that sometimes works is to only copy "most" of the string, leaving off the first or last character, and simply remember what that character is, and manually add it when I paste the value. I often have to attempt the copy several times before it actually works.

All Replies (10)

more options

Hi dkarr, I'm familiar with some Network Monitor issues.

For example, on the Headers panel, it is difficult to select header values. Highlighting doesn't always indicate being selected; triple-clicking the value before copying seems to work best for me. Alternately, you can turn on "Raw headers" to more easily select exactly what you want, especially if you want header names and/or multiple headers.

For the Cookies panel, there is a similar issue with individual cookie or field values. As you point out, it is much easier to select multiple lines than to work with an individual value.

The Dev Tools team maintains a forum over here if you want to give feedback on issues:

https://discourse.mozilla.org/c/devtools

more options

If this is in the request and response headers in the Network Monitor then try to switch to the raw headers. That also makes it possible to copy the full field (label + value).

more options

Is there any way to do the same thing for cookies? I was able to set raw headers, but not raw cookies.

more options

The Set-Cookie response header and the Cookie request header are the ugly versions of what you see on the Cookies panel.

more options

jscher2000 said

The Set-Cookie response header and the Cookie request header are the ugly versions of what you see on the Cookies panel.

When I view the set-cookie response header, I see a couple of cookies set there, but in the Cookies panel, I see dozens.

more options

Hmm, that's strange. I would expect them to match.

more options

Sorry, you were correct. I was only looking at the set-cookie response header. I didn't fully realize that they would be divided between the response and request.

more options

So it appears that I have to set raw headers in both requests and responses every time I start a session. I don't see a preference to make this the default. Would it be a reasonable enhancement request to have a setting to make this the default?

more options

I think a lot of enhancements are possible! You may want to pursue it on the other forum I mentioned because the DevTools team doesn't monitor this one.

more options