If it worked before and it doesn't after you
leave the page idle for some time
Then either:
- something is killing the $display parameter (in which case I'm sure you'd see a plethora of errors):
- perhaps you've some script that executes in between it working and not working (is there a consistent timeframe for example) and causes a refocus on another frame without access to your require params/$display.view
- or something within the context of the debug console has changed
Can you confirm if, after the error presents itself, you are viewing the same frameset as identified below (note that there may be more than 1 dashboard displayed and not all will necessary behave the same with regards available parameters etc.)
I presume that this is a problem that's causing some script you're writing to fall over (as opposed to purely being angry that the console debug fails you - I've been there, believe me!) - is it possible to simply test that you have access to the correct params in your code and gracefully fall over?
Or perhaps you could attach an event to the item you're losing focus from and use breakpoints or similar to track where it's going which may lead to why (especially if the console gives you access to the call stack etc.)
window.top.frames[0].Tridion.getApplicationWindow()
).