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 '19 at 7:54

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 '19 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 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 '18 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.