Copy JSON copies only half of JSON

I use the Webstorm debugger to check local variables for my Node application. However, when I right-click on a variable of interest to me and click Copy JSON , the paste-in output contains only half of the JSON.

Has anyone experienced this problem and what have you done to solve this problem? Yes, I could console the data or write it to a file, but I decided that using a debugger would be more efficient.

Thanks in advance, Question

+5
source share
1 answer

Yes, I saw it too. Do not know what causes it. Here is a workaround:

Try going to the console tab and saving the variable as a JSON string as follows:

 JSON.stringify(myvar); 

Then copy the results and, if necessary, analyze them elsewhere:

 JSON.parse('..data goes here..') 

Remember to use single quotes because JSON everywhere contains double quotes.

+5
source

Source: https://habr.com/ru/post/1241069/


All Articles