Published on

How to Copy a Full JSON Object from the Debug Console in Firefox

Authors

Often when you are debugging something in your UI project you console.log an object to get an idea if it is getting hit and what values are involved.

This is great for seeing the object and you can expand it in the console. But if you want to copy the full object from the console output it is not so obvious how you do this in Firefox.

For example if I had the following:

console.log(widgetOptions)

I can copy it by simply right clicking the unexpanded object in the Firefox console and click Copy object as below:

copy-console-log-of-only-object

You can also easily copy the object part of a console.log that has a message before it by only right clicking on the object portion:

console.log('---- object to debug -----', widgetOptions)
console-log-object-when-message-and-object