OSX无法通过`open`命令打开``chrome''://`协议



当我尝试编辑

open "chrome://settings"

它说:file/chrome:/settings不存在。

open -a Google Chrome "chrome://settings"

也无法打开Chrome中的设置。open命令似乎只能打开http && https协议

实际上,我想在Chrome Dev工具中调试一些节点代码

node --inspect --debug-brk index.js

我必须将调试链接复制到Chrome中才能打开开发工具。我想自动打开它。但是打开命令不能。

我做了一些研究。似乎Chrome不允许这样的内部URL出于安全问题。访问这些内部页面,即使使用using window.location.replace("chrome://settings/")

也无法直接访问

这些涉及创建扩展名,或更改打开默认/第一页的Chrome配置文件。

  • 使用Extension(credits @alvin-wong on superuser.com上(https://superuser.com/questions/558672/open-chrome-and-chrome-and-launch-the-settings-page
  • 更改配置文件设置并通过脚本https://productforums.google.com/forum/#!/chrome/chrome/2tm8whyf6y8/o7zaggfdbrmj

尽管这些可以解决您的问题,但是它们都是骇人听闻的方法,因此不建议进行。

最新更新