Flag --auto-open-devtools-for-tabs does not work
A bunch of searchable info on the web indicates that it is possible to open DevTools automatically when you launch msedge programmatically, e.g. via launch.json launch command. But is seems not to be working anymore.
Also some sources indicate that for it to work, it should be the fist instance of msedge (or chrome for that matter) to work.
In my test I found that --auto-open-devtools-for-tabs switch does not work with or without existing msedge instance, while the same flag works with chrome.
Tested via vs code launch.json and with cmd start msedge --auto-open-devtools-for-tabs
MS Edge version:
| Microsoft Edge | 119.0.2151.44 (Official build) (64-bit) |
|---|---|
| Revision | 44557a29097af522913330e5b41f74810bdfb1a2 |
| Chromium version | 119.0.6045.105 |
| Operating system | Windows 10 Version 22H2 (Build 19045.3570) |
| JavaScript | V8 11.9.17.5 |
AB#47708787
Just tested this with Edge 120 from the command line, and it worked:
"C:\Users\____\AppData\Local\Microsoft\Edge SxS\Application\msedge.exe" --auto-open-devtools-for-tabs
Doing the same with Edge 119 doesn't work:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --auto-open-devtools-for-tabs
So this might have been a regression that then got fixed. Would you be able to test in Edge Canary and confirms that it works for you there?
I dont know if is related but I had a trouble with DevTools not oppening when hit F12 or Inspect element button, I have opened an issue telling about it. Then one dude come and comment, he was having the same issue, I saw his name and recognize as Brazilian name (like me). Then my first idea was to change the main language of my browser from pt-BR to en-US then boom...the DevTools window opened.
So, in my case it looks like there is mistake with the language of the browser.
I think these are two different issues. The pt-BR problem is impact all ways to open DevTools. But here the problem only concerns the --auto-open-devtools-for-tabs option.
@captainbrosset I can confirm that the flag works on the later versions, e.g. current Dev build, but only if no instance is already running. Otherwise the flag is ignored.
Tested on 121.0.2220.3 (Official build) dev (64-bit)
Thanks for confirming. 120 releases in 2 weeks from now, so this bug will go away on its own.
but only if no instance is already running. Otherwise the flag is ignored.
I believe this is expected, and was already the case before the bug.
Only takes effect when the msedge.exe instance is not running. Otherwise, the flag will be ignored. You can use tasklist | findstr "msedge.exe" to check.
Tested on 126.0.2592.113 (official version) (64 bit)