google-chrome

How to tell what CLI switches has Chrome been started with?


I've asked a question previously where I've had a problem with using a CLI switch for influencing Chrome's security model. The question has received a good and helpful answer, but it didn't work for me. I am now unable to determine if the problem is with the answer not being correct or if my installation of Chrome is borked. To try to find out I'd like to start by checking if Chrome sees the CLI arguments I passed to it.

Is there a way to use a running instance of Chrome and check what CLI switches has it been started with? This will help me determine if I've passed the switch in to Chrome correctly and I can move on from there.


Solution

  • TLDR; chrome:version.

    I know it's old. I was trying a v8 flag. I knew there was a way to see the current command line arguments in at least one of the links in chrome:about or chrome:chrome-urls (They seem to be the same). I found this question when I searched online. Then decided to try one by one in random order. chrome:version was the winner. I remember another page but don't know which. It's chrome:gpu, just the same.

    The problem is, it doesn't specify if those flags are recognized. Mine is like this:

    "C:\Program Files\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files --js-flags=--js-base-64 --useless-bekir-flag --flag-switches-begin --enable-features=UnexpireFlagsM136 --flag-switches-end
    

    I enabled chrome://flags/#temporary-unexpire-flags-m136 on purpose and added --useless-bekir-flag to see if it's gonna appear in there. --flag-switches-begin and --flag-switches-end and the ones in between are added automatically. The real "target" is this:

    "C:\Program Files\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files --js-flags="--js-base-64" --useless-bekir-flag
    

    Also it's all mentioned in here.