添加环境变量
export PATH="/Applications/Google Chrome.app/Contents/MacOS:$PATH"
把上面的这一句添加到bashrc中,我的是zshrc,然后激活环境:
source ~/.zshrc
然后打开chrome:
Google\ Chrome --remote-debugging-port=9222 --user-data-dir="~/ChromeProfile"
运行这个后,就可以看见一个chrome打开了,接下来写程序连接它