Search code examples
javascriptdebuggingwebstorm

how do you copy the full string in the webstorm debugger


I often times have long strings when I debug in WebStorm. How do I copy the full string from the debugger window?

Things I have already tried: right click and copy doesn't get the full string. I still get something like this

"categoryId=4bf58dd8d48988d121941735,4bf58dd8d48988d11f941735,4bf58dd8d48988d1e79... (length: 194)"

I have tried using the watch window but it doesn't display much more.

Of course I can output the string via console writing or logging but that would require me to change the code.


Solution

  • There is a workaround that could help you. You could use the console to show and copy the results, but you don't need to change your code:

    enter image description here

    As you already have the debugger window open, just go to the Console tab and type console.log(yourvariable). The full string will appear, so just select it and copy with right click or Ctrl-C.

    I used it with humongous strings and had no issues...