Developing and testing features or extensions for Microsoft Edge
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
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?
Developing and testing features or extensions for Microsoft Edge