Reputation: 1449
I just learned that Edge can have different profile directories. The default one is this one and is used most of the time:
C:\Users{userName}\AppData\Local\Microsoft\Edge\User Data
But I could create another set of profiles when I launch the msedge.exe with a user-data-dir parameter. For example like this:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir=C:\Blub"
If you start edge in this way, you can generate a new set of profiles that are stored in "C:\Blub".
I stumbled across this parameter when I learned how to debug with VS Code.
This article explains that the user-data-dir parameter is also needed for this.
But here you are not using a concrete path, but a value "remote-debug-profile" like this:
edge.exe --remote-debugging-port=9222 --user-data-dir=remote-debug-profile
Also here a new "set of profiles" can be generated that will only be available when launching Edge with the remote-debug-profile parameter.
And the edge debugging only works with profiles stored there. Whenever I try to connect my visual studio code debugger for edge with a profile instance from another directory, this fails.
Is there any way how I can debug profiles that are stored in another directory?
Background is that I sync all my profiles between many devices and those tools prevent me from storing profiles at the default place for debugging.
Upvotes: 0
Views: 981
Reputation: 131
To setting the --remote-debugging-port
debug connection, need to set a separate --user-data-dir forces a new instance of the browser to be opened. If this flag isn't given, then the command will open a new window of any running browser and not enter debug mode.
edge://version
in Microsoft Edge and view the property Command-line.taskkill /f /im msedge.exe
in Command-line.Note: When setting a separate remote-debug-profile file path, please note that the profile path is enclosed in quotation marks.
Update:
Also, we can manage to get debugging with other profile path.
(For example: I created the path C:/debugging and my cmd is start msedge.exe --remote-debugging-port=9222 --user-data-dir="C:\debugging" --profile-directory="Profile 1"
)
Go to edge://version
in Microsoft Edge and view the property Command-line. It shows below screenshot:
In the same way, you can specify other paths for debugging.
However, you need to make sure all Edge processes are closed, and check if the separate path is correct.
Upvotes: 0