MicrosoftEdge / DevTools

Feedback and discussions about Microsoft Edge Developer Tools
MIT License
151 stars 49 forks source link

Flag --auto-open-devtools-for-tabs does not work #197

Open jurijsk opened 8 months ago

jurijsk commented 8 months ago

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

captainbrosset commented 8 months ago

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?

Victorhtf commented 8 months ago

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.

captainbrosset commented 8 months ago

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.

jurijsk commented 7 months ago

@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)

captainbrosset commented 7 months ago

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.