How can I launch Chrome with flags from command line more concisely?

后端 未结 4 723
执念已碎
执念已碎 2021-02-02 07:57

I am developing a WebGL driven application and I want to launch chrome like this from the command line:

open -a Google\\ Chrome --args --disable-web-security
         


        
4条回答
  •  Happy的楠姐
    2021-02-02 08:43

    This work for me:

    1. Modify the .bash_profile
    2. Write this alias:
    alias cchrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/tmp/chrome_dev_session" --disable-web-security'
    
    1. Run
    exec $SHELL
    1. With the cchrome command open a new windows of chrome with the disable web security to solve the "access-control-allow-origin" problem

提交回复
热议问题