Microsoft Edge Remote Debugging is Not Working When Using the Default User Profile

Tejeswar Reddy GV 20 Reputation points
2026-08-16T17:15:45.0233333+00:00

Hi,

I am trying to enable remote debugging/CDP for Microsoft Edge using my existing/default Edge profile.I am using the following command:

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222

or

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir="default" --remote-debugging-port=9222

Edge launches successfully, and when I open edge://version, the Command Line shows:

--remote-debugging-port=9222

However, the debugging endpoint is not available.

For example:

netstat -ano | findstr :9222

returns nothing, and:

http://localhost:9222/json

is not reachable.

What I observed

Interestingly, remote debugging works when I specify a custom user-data directory:

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir="C:\edge-debug-test" --remote-debugging-port=9222

In this case:

netstat -ano | findstr :9222

shows the port as listening, and the CDP endpoint is accessible.

I found a similar issue with Chrome, and I was able to find documentation explaining that Chrome introduced restrictions around remote debugging the default user-data directory.

https://developer.chrome.com/blog/remote-debugging-port

However, the current Microsoft Edge documentation seems to indicate that remote debugging using --remote-debugging-port should work, and I could not find any documentation describing a similar restriction for Edge.

Has Microsoft Edge also introduced a recent restriction on remote debugging the default user-data directory/profile?

If so, is there any official documentation or announcement describing this change and the recommended way to enable CDP for an existing/default Edge profile?

Microsoft Edge | Microsoft Edge development
0 comments No comments

Answer accepted by question author
Damien Pham (WICLOUD CORPORATION) 2,135 Reputation points Microsoft External Staff Moderator
2026-08-17T03:06:12.99+00:00

Hello @Tejeswar Reddy GV ,

Thanks for the thorough write-up. Your comparison test already isolates the cause nicely, and I appreciate the effort you put into narrowing it down before posting.

What you're seeing lines up with the upstream Chromium change you found. From Chrome 136, --remote-debugging-port and --remote-debugging-pipe are no longer respected when the browser is launched against the default user data directory, and they must be accompanied by --user-data-dir pointing to a non-standard directory. The reasoning is that a non-standard data directory uses a different encryption key, which keeps profile data protected after attackers began abusing the remote debugging port to extract cookies.

Since Microsoft Edge is built on Chromium, it inherits this behavior, which matches your observation exactly: the switch shows up in edge://version, but nothing ends up listening on 9222. On Chromium the browser reports this as "DevTools remote debugging requires a non-default data directory. Specify this using --user-data-dir." when launched from a terminal, so it may be worth launching Edge directly from a console window to see whether the same message appears in your case.

On documentation, I wasn't able to find an Edge-specific announcement or a Learn article describing this restriction. The Microsoft Edge DevTools Protocol page still presents --remote-debugging-port=9222 on its own with --user-data-dir shown as optional, and that page hasn't been revised since 2021, so it predates the Chromium change rather than contradicting it. I can't confirm on your behalf that Edge formally adopted the restriction as an intentional Edge-side decision, only that the symptom and the exact boundary condition are consistent with it.

One small note on your second command: --user-data-dir="default" is a relative path, so it creates or uses a folder named default next to the working directory rather than pointing at the real default profile. That's why it isn't a true test of the default-profile case.

For now, the working approach is the one you already found, using an absolute path to a dedicated directory:

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222 --user-data-dir="C:\edge-debug-test"

I do understand this is inconvenient when the goal is specifically to attach to your existing signed-in profile with its extensions and session state, since a separate directory means signing in again and setting things up from scratch. That isolation is unfortunately the intent of the change, so there isn't a supported switch that restores CDP on the default profile.

If you'd like an official Edge statement or a documentation update covering this, sending feedback from the browser with Alt+Shift+I routes it to the Edge team, who would be the right group to confirm intent and update the guidance.

Hope this helps clarify things. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guidance or provide feedback.    

Thank you.    

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.