如何从JavaScript打开Goog​​le Chrome控制台? [英] How can I open the Google Chrome Console from JavaScript?

查看:137
本文介绍了如何从JavaScript打开Goog​​le Chrome控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题听起来很奇怪,但我需要这种事情发生。另一种方法是让人们按Ctrl + Shift + i,但我宁愿避免这种情况,只提供一个链接。



链接将显示在Chrome中所以我只对谷歌浏览器感兴趣。

解决方案

目前尚不清楚为什么您需要提供此类链接。
DevTools不是最终用户的工具。
如果你不喜欢键盘快捷键,那么有一个页面chrome:// inspect /它有页面和扩展名列表,并且每个条目都有一个打开devtools的链接。



另外,您可以使用在页面中打开devtools的远程调试页面。
https://developers.google.com/chrome-developer -tools / docs / remote-debugging


The question might sound weird but I kind of need this to happen. The alternative would be to ask people to press Ctrl+Shift+i but I would prefer to avoid that and just provide a link.

The link would show up in a Chrome Extension so I'm only interested for Google Chrome.

解决方案

It is not clear why you need to provide such link. DevTools is not a tool for the end user. If you don't like keyboard shortcuts, then there is a page chrome://inspect/ which has the list of pages and extensions, and each entry has a link that opens devtools.

Also, you may use remote debugging page which opens devtools in a page. https://developers.google.com/chrome-developer-tools/docs/remote-debugging

这篇关于如何从JavaScript打开Goog​​le Chrome控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆