Browser
Requirements
Before you start, you must complete the Clients repository setup instructions.
Build Instructions
Build and run the extension:
cd apps/browser
npm run build:watchLoad the unpacked browser extension in your browser using the instructions in the next section.
Testing and Debugging
Chrome and Chromium-based browsers
To load the browser extension build:
- Navigate to
chrome://extensionsin your address bar. This will open the extensions page - Enable “developer mode” (toggle switch)
- Click the “Load unpacked” button
- Open the
buildfolder of your local repository and confirm your choice
You will now have your local build of the browser extension installed.
You can debug the background page of the browser extension by clicking “background.html” underneath
the Bitwarden heading in chrome://extensions. You can debug the popup by right-clicking it while
it is open and clicking “Inspect”.
Firefox
To load the browser extension build:
- Navigate to
about:debuggingin your address bar. This will open the add-on debugging page - Click “This Firefox”
- Click “Load Temporary Add-on”
- Open the
buildfolder of your local repository and open themanifest.jsonfile
You will now have your local build of the browser extension installed.
The temporary add-on will only be installed for the current session. If you close and re-open Firefox, you will have to load the temporary add-on again.
You can debug the background page of the browser extension by clicking the “Inspect” button next to the Bitwarden heading in the Temporary Extensions page. To debug the popup:
Inspect the background page using the instructions above
Click the “three dots” in the top right-hand corner of the debugger and click “Disable Pop-up Auto-hide”

Open the extension popup
Click the “iframe” button (next to the “three dots”) and select “/popup/index.html”
Safari
Safari WebExtensions must be distributed through the Mac App Store, bundled with a regular Mac App Store application. Due to this the build and debug process is slightly different compared to the other browsers.
Uninstall previous versions
If you’ve built, installed or ran the Desktop client before (including the official release), Safari will most likely continue to load the official Browser extension and not the version you’ve built from source.
To avoid this, follow the instructions below to uninstall the Safari extension:
- Open Safari
- Click “Preferences” and then click the “Extensions” tab
- Click uninstall next to the Bitwarden extension
- Delete the Application with the extension.
- Reopen Safari and check Preferences to confirm that there is no Bitwarden Browser extension installed. In case there still is a Bitwarden Extension please repeat step 3-4.
- Quit and completely close Safari
You may need to do this periodically if you are loading the Browser extension from different sources (for example, switching between a local build and the official release).
Developing in Xcode
The easiest way to develop the extension is to build and debug it using Xcode.
Build the extension:
npm run build:watchEdit
build/manifest.json. Move thenativeMessagingpermission from theoptional_permissionssection into thepermissionssectionEdit
build/index.html, replace<html class="__BROWSER__">to<html class="browser_safari">.Open
src/safari/desktop.xcodeprojin XcodeRun the "desktop" target.
Please remember to re-run through Xcode whenever any changes are made to the source files. It will not automatically reload.
Production build
The other alternative is to use the "proper" build process through gulp. This method doesn't require any manual processing of the output since gulp does it for us. However we have to completely rebuild the extension for every change, which is slower.
Build the extension for Safari
npm run dist:safari:dmgOpen Safari and check Preferences to confirm that the extension is installed and enabled
You may need to Configure Safari in macOS to Run Unsigned Extensions.
To enable debugging:
- Click “Preferences” and then click the “Advanced” tab
- Enable “Show Develop menu in menu bar”
You can debug the background page of the browser extension by clicking
Develop -> Web Extension Background Pages and then selecting Bitwarden. You can debug the popup by
right-clicking it while it is open and clicking "Inspect Element".
This should be enough for most debugging and testing, unless you're working in native code.