A Windows PowerShell tool that enables Edge DevTools remote debugging (CDP) on the default user data directory, working around the Chromium 136+ security restriction that blocks remote debugging on the default profile.
Starting with Chromium 136 (Chrome and Edge), the browser refuses to open a remote debugging port when using the default user data directory. The error is:
DevTools remote debugging requires a non-default data directory. Specify this using --user-data-dir.
This means you cannot use CDP-based tools (AI agents, automation frameworks, debuggers) on your everyday browser profile — the one that already has your logins, bookmarks, extensions, and history.
Instead of fighting the restriction, the tool changes what Edge considers its "official" data directory:
- Renames
User Data→My User Data(renaming preserves file timestamps). - Copies
My User Databack toUser Dataas a backup snapshot. - Sets the registry policy
HKLM\SOFTWARE\Policies\Microsoft\Edge\UserDataDirto point atMy User Data.
Edge now treats My User Data as its legitimate data directory. Because it is no longer the default path, the Chromium 136 restriction does not apply, and remote debugging works normally.
All your logins, bookmarks, passwords, extensions, history, and cached site data are preserved.
- Windows 10 or Windows 11
- Microsoft Edge installed at the default location
- Administrator privileges (the script writes to
HKLM)
- Download the latest release from the Releases page.
- Extract the zip.
- Double-click the
.batfile. - Choose option
1(Configure). - Enter a port, or press Enter to use the default
9222. - When the UAC prompt appears, click Yes.
After configuration, two shortcuts named Edge remote debugging are created (Desktop and Start Menu).
| Scenario | Action |
|---|---|
| Normal browsing | Launch Edge any way you like. |
| AI agent takeover | Fully exit Edge (including tray), then double-click Edge remote debugging. |
| Switch back | Fully exit Edge, then launch Edge normally. |
Why fully exit? Edge is a single-instance application. If an instance is already running, new command-line flags are forwarded to the existing process and the debugging port will not open.
Run the same .bat, choose option 2 (Rollback). This:
- Closes Edge and related processes.
- Lists extensions that disappeared since configuration (informational only).
- Deletes the
User Databackup. - Renames
My User Databack toUser Data. - Removes the registry policy and the two shortcuts.
- This is not an official Microsoft tool. It is a community workaround. Use at your own risk.
- The rollback process deletes the
User Databackup snapshot to fully restore the original state. If you want to keep it, copy it elsewhere before rolling back.
Chromium 136 introduced a security check: remote debugging is disabled when the data directory matches the default path. The check uses path normalization, so trailing backslashes, .. variants, and directory junctions do not bypass it.
The registry policy UserDataDir changes Edge's notion of the default directory itself. Once set, Edge uses the specified path unconditionally, ignoring any --user-data-dir command-line flag. Because the new path is not the built-in default, the security check passes.
If this project helps you, feel free to buy me a coffee.
MIT


