how to see the dump() message in firefox?

前端 未结 3 1054
南笙
南笙 2021-01-17 04:48

I\'m currently developing a firefox extension. I use dump() function. But the messages are not showing up in the console. I\'ve cahnged the value of brows

3条回答
  •  长情又很酷
    2021-01-17 04:55

    Starting Firefox with -console command line switch is only necessary on Windows. If you are using Linux then you should simply start Firefox from a terminal window. On Mac OS X the console messages can be displayed via some application (sorry, don't remember which one). Also, changing browser.dom.window.dump.enabled is only necessary if you are logging from a window-bound context - in JavaScript modules and such it always works regardless of this preference.

    If you want to have your logging messages available more easily you should be using Components.utils.reportError() (or nsIConsoleService.logStringMessage() as explained in the documentation) - this will send messages to the usual Error Console that can be opened at any time.

提交回复
热议问题