Opening Development Tools from command line with Firefox open does not work
Categories
(DevTools :: General, enhancement, P3)
Tracking
(firefox67 affected, firefox68 affected, firefox69 affected)
People
(Reporter: ngroot95, Unassigned)
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Steps to reproduce:
(Windows 10 x64 Version 1803, Firefox Version 67.0.4 64-bit)
- Start Firefox
- Start Command Prompt (cmd.exe)
- In Command Prompt, navigate to the Firefox installation folder. In my case with the following command:
cd C:\Program Files\Mozilla Firefox
-
Press ENTER.
-
In Command Prompt, enter the following command:
firefox -devtools
- Press ENTER.
Actual results:
A new Firefox window opened without the Development Tools open.
Having no instance of Firefox running (skipping step 1.) results in no issue: the Development Tools window opens in a new Firefox window.
Expected results:
A new Firefox window should open with the Development Tools window open.
Comment 1•6 years ago
|
||
I tried to reproduce this issue on Firefox 67.0.4 and on Firefox 69.0a1 on Windows 10 x64 and in case you have Firefox already running trying to run "firefox -devtools" command will open a new window but without "Developer Tools".
Comment 2•6 years ago
|
||
Not sure why, but this appears to be intentional: https://searchfox.org/mozilla-central/source/devtools/startup/DevToolsStartup.jsm#275
(In reply to Dave Townsend [:mossop] (he/him) from comment #2)
Not sure why, but this appears to be intentional: https://searchfox.org/mozilla-central/source/devtools/startup/DevToolsStartup.jsm#275
Good find, thank you. I also don't see why it is this way. When building scripts/automate certain tasks this can be quite annoying. I hope this behavior could be changed.
Comment 4•6 years ago
|
||
The priority flag is not set for this bug.
:pbro, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•6 years ago
|
||
Unfortunately the link in comment 2 isn't a permalink to a specific revision and I think the file has changed since that comment was posted.
I'm guessing this was supposed to point to somewhere around here: https://searchfox.org/mozilla-central/rev/4436573fa3d5c4311822090e188504c10c916c6f/devtools/startup/DevToolsStartup.jsm#320-329
where we seem to only handle the devtools
flag for the initial launch.
I have a feeling this can be changed now, but let me ping Julian.
Comment 6•6 years ago
|
||
Per https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-devtools
Start with native Developer Tools opened.
We don't support to open devtools on existing windows via command line args. I'm removing the defect flag, unless there's any documentation that contradicts this?
If we want to support it we need to be careful about only opening devtools on the next window ready and not attaching all DevTools related events. This is why we only do part of the logic on initial launch. See https://bugzilla.mozilla.org/show_bug.cgi?id=1413246
Comment 7•6 years ago
|
||
This MDN page seems slightly outdated, so here's the relevant output from --help
> ./firefox --help
Usage: ./firefox [ options ... ] [URL]
where options include:
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or --help Print this message.
-v or --version Print Firefox version.
[...]
--devtools Open DevTools on initial load.
[...]
Updated•3 years ago
|
Updated•1 year ago
|
Description
•