问题描述
环境:
- Mac;
- chrome版本:81.0.4044.138(正式版本) (64 位)
问题复述:
- 使用sudo mode参数启动chrome:
sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
-
启动之后报错,如下(但是chrome窗口是可以显示出来的):
-
在这个启动的chrome中输入爱测网站地址,会报错如下:
解决方案
- 使用以下命令,正常打开Chrom且不会报上述截图中的错误:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
踩坑原因:
- 上面带sudo的命令是在百度上查到的,我的电脑上,使用sudo是可以打开chrome的,但是无法对chrome进行读写,也无法打开网页。