I am using Node Monkey to debug my NodeJS app.
It happens frequently that when I click \"Store as Global Variable\" in my Chrome Console it says \"Failed to save to temp
I can see two reasons why Store As Global Variable wouldn't work:
1. Wrong Console Context Selected
This is arguably a Chrome bug, but you can only store an object as a global if the console is set to the same context as the code that logged the object.
In practice this means you might need to select the correct IFrame or web worker.
For example, on jsFiddle:
In the normal jsFiddle editor page context I'm getting an error. But it works if I change the context to the contents of the fiddle itself:
2. Garbage Collection
In order for Chrome to give you a reference to the object the object still has to be in memory. If that isn't the case it can only throw an error.
However, I'm pretty sure that being shown in the console forces V8 to keep a reference to the value.