7
votes

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?

2

2 Answers

4
votes

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.

1
votes

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.