Firefox addon for setting XDEBUG_PROFILE cookie
Install: Firefox Add-ons (AMO) (desktop and Android) · Chrome Web Store — under review
Now works in Firefox 140+, Firefox for Android 142+ and Chrome / Chromium 121+ (one Manifest V3 codebase). On Android there are no keyboard shortcuts (the browser has no commands API); every browser API is checked before use, so missing APIs only switch off the related feature.
The toolbar popup toggles Xdebug trigger cookies for the current site:
| Trigger | Cookie (default) | Xdebug mode | Badge |
|---|---|---|---|
| Debug | XDEBUG_SESSION=vsc (IDE key) |
debug |
D |
| Profile | XDEBUG_PROFILE=Y |
profile |
P |
| Trace | XDEBUG_TRACE=Y |
trace |
T |
The cookie can be set for the current host only or for a parent domain with all
its subdomains (e.g. .example.com for api.example.com and www.example.com).
The choice is remembered per host.
Click the IDE name in the popup to set an own IDE key for the current site (e.g. a project behind a DBGp proxy). Other sites keep the global key.
Interface languages: English, Russian, Kazakh (follows the browser language).
Alt+Shift+K- open popupAlt+Shift+F- toggle profiler cookieAlt+Shift+D- toggle debugger cookie
(Alt+Shift+P and Alt+Shift+X are reserved by Chrome for tab groups.)
- toggle trace cookie - no default shortcut
Firefox: about:addons → gear → "Manage Extension Shortcuts".
Chrome: chrome://extensions/shortcuts.
Firefox: about:debugging#/runtime/this-firefox → "Load Temporary Add-on…" → select manifest.json.
Firefox may treat host permissions as optional: if the popup shows "Grant access", click it.
Chrome: chrome://extensions → enable "Developer mode" → "Load unpacked" → select the repository folder.
Package: npm install && npm run build → web-ext-artifacts/*.zip (works for both browsers).
npm install
npm run lint # web-ext lint
npm run test:unit # no browser: API helpers, Firefox for Android-like environment
npm run test:chrome # Playwright, Chromium (CHROMIUM_PATH can point to a custom binary)
npm run test:firefox # Selenium + geckodriver, needs Firefox
# (FIREFOX_PATH / GECKODRIVER_PATH can point to custom binaries)GitHub Actions run lint and both browser tests on every push and pull request.
Bump version in manifest.json, merge to master, then push a tag with the same version:
git tag v1.1 && git push origin v1.1The Release workflow checks the version, builds the zip and creates a GitHub release with it.
Store listing texts, privacy policy and images are in store/.
Xdebug 3:
xdebug.mode = debug,profile,trace
xdebug.start_with_request = trigger
xdebug.output_dir = /tmp/xdebug
; optional: if set, cookie values in addon options must be the same
; xdebug.trigger_value = YXdebug 2:
xdebug.remote_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.trace_enable_trigger = 1
xdebug.profiler_output_dir = /tmp/xdebugOpen the generated cachegrind.out.* files in KCachegrind / QCachegrind.
- IDE for step debugging: the
XDEBUG_SESSIONvalue is passed to the IDE as IDE key. Presets: VS Codevsc(default,php.debug.ideKeyof the PHP Debug extension), PhpStormPHPSTORM, NetBeansnetbeans-xdebug, EclipseXDEBUG_ECLIPSE, MacGDBpmacgdbp, or a custom key (e.g.VSCODE). Without DBGp proxy andxdebug.trigger_valueany key works; with DBGp proxy it must match the key configured in your IDE. The options page asks to choose the IDE after installation; - cookie name and value for every trigger (value must match one of
xdebug.trigger_valuevalues if it is set, since Xdebug 3.1 it can be a comma separated list); - icon colors for "on" and "off" states.
After renaming a cookie in options, cookies with the old name/value are removed from all sites.
All scripts log with the [XDEBUG_PROFILE] prefix (enable "Debug"/"Verbose" level in the console):
- Firefox:
about:debugging#/runtime/this-firefox→ this addon → "Inspect"; - Chrome:
chrome://extensions→ this addon → "service worker".
Popup can be opened in a regular tab for a given tab: popup.html?tabId=N.
common.js- shared code (triggers, cookies, settings), used by all pages;background.js- icon, badge, shortcuts, sync with cookie/settings changes;popup.html/js/css- toolbar popup;options.html/js/css- settings page;_locales/- translations (en, ru, kk);tests/- browser tests,store/- store listing materials.





