👤
Browser profile
Control browser state isolation during development with managed, persistent, or custom profiles.
Keep browser sessions isolated or persistent based on your workflow. Extension.js launches browsers with profile-aware defaults so you can choose clean runs, reusable state, or an explicit local profile path.
How it works
Profile mode is selected in this order:
- Explicit
profilepath (if provided) - Managed profile mode (default)
- ephemeral by default
- persistent when
persistProfile: true
- System profile mode when
EXTENSION_USE_SYSTEM_PROFILE=true
Profile capabilities
Profile modes
Managed profiles are created under:
dist/extension-js/profiles/<browser>-profile/<...>
Persistent mode uses:
dist/extension-js/profiles/<browser>-profile/dev
Configure in extension.config.*
You can also scope profile defaults by command:
CLI usage
Use an explicit profile path directly:
Works similarly with start and preview.
Lifecycle notes
- Ephemeral managed profiles are created per run.
- Persistent managed profile (
dev) is reused across runs. - Managed profile directories are cleaned up with best-effort retention logic (
EXTENSION_TMP_PROFILE_MAX_AGE_HOURS).
Best practices
- Use managed ephemeral profiles for baseline testing: Reduces hidden state and flaky reproductions.
- Use
persistProfilefor long-lived debug sessions: Keep auth/session/devtools state between runs. - Keep custom profiles per browser family: Avoid cross-browser contamination.
- Use system profile mode intentionally: Useful for reproduction, but less isolated than managed profiles.
Next steps
- Learn more about Browser preferences.
- Learn more about Browser flags.
