How can I make interactive Karma run my own Firefox with Firebug installed (on CentOS 7)?

42 views
Skip to first unread message

David Karr

unread,
Jun 8, 2015, 4:01:07 PM6/8/15
to karma...@googlegroups.com
I've used Karma a few times in various projects, but until now only on Windows.

I'm now trying to set it up on CentOS 7.  If I use the PhantomJS browser, it does pretty much what I expect.

When I did this previously on Windows, I could change the browser to Firefox or Chrome so that I could debug a unit test that wasn't doing what I expected. Firefox worked fine because I had installed Firebug in my Firefox instance, so it shows up when Karma runs Firefox.

When I run Firefox manually in CentOS, it shows the Firebug icon as I expect. However, when I run Karma, settings the "browsers" list to "Firefox", it does run Firefox, but it doesn't have any of my add-ons, Firebug included.

Is this something I have to fix on the Karma command line or configuration, or something I have to fix in my Firefox configuration?

dignifiedquire

unread,
Jun 15, 2015, 3:02:26 PM6/15/15
to karma...@googlegroups.com
Hey

thanks for using Karma :) By default Karma loads Firefox with no extensions but you can tell it to load some manually. Take a look at [1] in the section "Loading Firefox Extensions"

Cheers
Friedel


[1] https://github.com/karma-runner/karma-firefox-launcher/blob/master/README.md

David Karr

unread,
Jun 17, 2015, 12:14:41 PM6/17/15
to karma...@googlegroups.com

Finally getting back to this.

The example will try to load the extension from my current directory, not from my "~/.mozilla" tree, unsurprisingly.  Can I just copy the ".xpi" file from my "~/.mozilla" tree into the test resources for my project and reference it there?

David Karr

unread,
Jun 18, 2015, 5:09:46 PM6/18/15
to karma...@googlegroups.com

I guess I answered my own question.  I just copied the relevant ".xpi" file from the ~/.mozilla tree into my project tree and referenced that with a relative path. Worked on the first try.
Reply all
Reply to author
Forward
0 new messages