Steps to reproduce: 1.) Open browser debugger 2.) Open webconsole 3.) Type "Function" into webconsole and click on it You'll see "notDebuggee: cannot access the environment of this function." in the browser debugger.
Sorry, open browser console.
This is just an informational warning, do you think we should silence those? I thought they might be useful to explain why you can't inspect the closure in the console or scratchpad when the debugger isn't active.
Well, for every other built in function that doesn't have a closure, we just don't display <Closure>. We do for Function.prototype for some reason, which I assume is the reason this error comes up. We probably should just not show <Closure> for Function.prototype (not sure why we do now).
I don't believe we do anything special for "Function" in this case, it's just that the engine has associated a closure with it. The message comes from this line, which I added just to make sure this would not go unnoticed: http://mxr.mozilla.org/mozilla-central/source/browser/devtools/shared/widgets/VariablesViewController.jsm#187 Removing this line (and the Cosnole.jsm import) will remove the warning, without any other ill effects. Jim said that we should maybe modify the web console to always add the page global as a debuggee, which would make sure this error would never happen again, which could also be another approach here. It's not going to be as simple or happen as fast as the other option of course.