This is an old revision of the document!


Zotero Plugin Development

This page is a work in progress.

Setting Up a Plugin Development Environment

After creating your plugin source directory with sample code, you can tell Zotero to load the plugin straight from your source code by creating an extension proxy file. (This is a technique that used to be possible for Firefox extension development, though it's since been discontinued in Firefox.)

  1. Close Zotero.
  2. Create a text file in the 'extensions' directory of your Zotero profile directory named after the extension id (e.g., myplugin@mydomain.org). The file contents should be the absolute path to the root of your plugin source code directory, where your install.rdf file is located.
  3. Open prefs.js in the Zotero profile directory in a text editor and delete the lines containing extensions.lastAppBuildId and extensions.lastAppVersion. Save the file and restart Zotero. This will force Zotero to read the 'extensions' directory and install your plugin from source, after which you should see it listed in Tools → Add-ons. This is only necessary once.
  4. Whenever you start up Zotero after making a change to your extension code, start it from the command line and pass the -purgecaches flag to force Zotero to re-read any cached files. (You'll likely want to make an alias or shell script that also includes the -ZoteroDebugText and -jsconsole flags and perhaps -p <Profile>, where <Profile> is the name of a development profile.)
dev/client_coding/plugin_development.1601195765.txt.gz · Last modified: 2020/09/27 04:36 by dstillman