This may be a very basic questions, but I don't seem to find the answer for it! Basically I want my console.log statements to show all the good stuff instead of the LockerService Proxy object. Is there a way to do that without setting the API version to lower than 40.0? Even then I'm not sure if that'll do it.

For now I'm using JSON stringify.

  • could you provide more details on which objects are wrapped in proxies? I think this could be handled with a customDevtoolFormatter but I'd need more info (I'm not very familiar with the LockerService)
    – NSjonas
    Apr 23, 2019 at 7:54

4 Answers 4


This will get it out of proxy and back into nice, readable format.


Used it so much I made a snippet of it (vscode, sublime, maybe others)

"xlog": {
    "prefix": "xlog",
    "body": [
    "description": "logs json stuff through proxy"
  • This is one of the most useful tricks I've seen in recent memory. Feb 11, 2019 at 19:44
  • Yes... one wonders why this is not a function in inspector... I think Google wants us to use the debugger...
    – Joeri
    May 14, 2021 at 10:31

Here is how I generally work in chrome when i see a proxy object,

Use the chrome "store as global variable" on the proxy object as shown in the below screenshot

enter image description here

Then I just use the Javascript object.keys() and add a bit of Javascript in the console like below to print keys

for (let key of Object.keys(temp1)) {
        console.log(key + temp1);

That gets me what I need and then most of the times , I just have to rely on JSON.stringify() to see the output .

enter image description here

  • Thanks Mohith. That's pretty much my current approach except I am doing all of this right inside of the controller. But a sizeable benefit of your approach is that I don't have to jump back and forth to code. I like it.
    – Mossi
    Feb 8, 2018 at 7:20

I did everything above but nothing worked so I tried to look at the setup. Found this solution:

From Setup go to Session Settings and look for Lightning Web Security and under that is the Use Lightning Web Security for Lightning web components checkbox. Disable the checkbox and the console logs should be showing the structured JSON instead of proxy.

enter image description here

  • This is something new we recently got in the latest release. Nov 2, 2022 at 8:49

For those with Lightning Web Security switched on and who want to see the real values contained in console logged proxy objects you must first switch on the Enable custom formatters feature in Chrome DevTools. This is documented here.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .