8

I have found that the only sure way to test modifications I do to my extension, as I develop it, is to fully Remove it from my extensions and "Load unpacked extension" anew.

Any other shortcut method, and issues with cache crop up, such as it using the old version of my script.

So are there other, faster surefire solutions?

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
Vic Goldfeld
  • 1,179
  • 12
  • 15
  • Looks like a duplicate of [How do I auto-reload a Chrome extension I'm developing?](https://stackoverflow.com/q/2963260/450127) – Ian Dunn Jun 23 '18 at 17:52

2 Answers2

4

What I do for my extension, if it is a change to popup icon or favicon but NOT 48x48 shown in chrome://extensions is a simple reload extension. if you need to view changes to the 48x48 icon, I find you need to fully close and re-open chrome (background apps linger after closing chrome, such as offline mail or calendar or docs)

If you change source code and it isn't noticing the change with a simple refresh, (Maybe in the case of a content script) then I would disable then enable the extension, and if that doesn't work, reload the extension and then close/open chrome.

That should hopefully give you a few things to try, as I fully understand the pain of removing and then adding an extension, and closing and re-opening chrome is not ideal either. For that, I perhaps recommend having two installs of Chrome, either stable and Chrome Canary for development or you could use Chromium for developing

There are lot's of options! but separating developing and normal browsing is a good idea, just don't forget to test on a stable build as well!

For inline css (not added in the document head) closing and re-opening chrome (or removing re-adding the extension) is required. A simple refresh, enable/disable, close/open tab will not suffice.

If you are using Chrome Stable, you won't have access to many features I use as a developer like Chrome Profiles so I would recommend looking into getting either Chromium or Canary for developer purposes, because as a developer you do need to close/re-open the browser a lot (As I find it easier than re-loading an extension)

Addition 11/30/2011 For changing CSS values on an extension tab (options page, anything that appears as a tab), on windows use shift+F5 which clears the cache allowing new CSS to be displayed. This works in Chrome Canary with the disable cache option in the developer tools checked.

ArkahnX
  • 405
  • 1
  • 5
  • 9
  • Glad someone shares my pain! Had never heard of Chrome Canary before, what are the most relevant things it offers for developers? – Vic Goldfeld Nov 17 '11 at 00:11
  • Also, do you really find that you sometimes need to restart chrome for code changes to take effect? I do normal browsing and developing on the same instance, and usually have loads of tabs, so I'm glad I haven't yet needed to restart chrome, readding the extension suffices. – Vic Goldfeld Nov 17 '11 at 00:38
  • 1
    if that is any use for you, I'll add it to my answer so it's easier to find for anyone else who may view this question. – ArkahnX Nov 21 '11 at 16:35
  • oh now I get it! indeed relaunching a dev-only browser would be faster than reloading the extension. Definitely add it, now your answer seems thorough to me! – Vic Goldfeld Nov 21 '11 at 16:43
  • Oh, the question I mean--should make it easier to find AND gimme some love. The answer is great mate! – Vic Goldfeld Nov 22 '11 at 17:19
1

Try something like Quick Extension Reload. This Chrome extension provides the ability to ALT + r and reload all unpacked extensions in the browser. Then you just have CTRL + r and you're ready to rock.

Alternatively there is Extension Reloader. This Chrome extension provides an icon for the browser. Upon clicking it all unpacked extensions you've got that are loaded, get re-loaded.

I'd really rather this be a Development Browsing mode, but at least Quick Extension Reload is usable. It's the best I've found thus far.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468