How to debug "Permisson denied" error when using Firefox Addon SDK
When testing and debugging an extension us开发者_Go百科ing Addon SDK 1.0 I'm sometimes noticing the following in the debug output window:
error: An exception occurred.
Traceback (most recent call last):
Error: Permission denied to access object
Is there a any way to obtain more information? Some call stack info would be nice. Also it'd help to know to which "object" the access has been denied.
(I know I can put console.debug()
calls before every statement but I'm looking for a more elegant way here)
As Wladimir pointed out, this is actually a deficiency in Gecko's error reporting. So to debug it without sprinkling console.log()
all over, you'd have to either use a C++ level debugger or get the core deficiency identified and fixed. https://bugzilla.mozilla.org/show_bug.cgi?id=435025 already tracks quite a few cases where the error messages could be improved.
精彩评论