How can I open the Google Chrome Console from JavaScript? [duplicate]

这一生的挚爱 提交于 2019-11-28 11:53:52

Sorry, not likely to happen (except as a security hole). Your in-page JavaScript is deliberately sandboxed and limited - it can interact with the page, and with the network through AJAX, but it cannot and should not interact with other things that happen in your computer - including the browser.

loislo

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

Have you tried Firebug Lite. It is an in-browser tool similar to that found in Chrome.

http://getfirebug.com/firebuglite

It will give you most of the capabilities you are looking for (most likely), and will allow you to programmatically enable it and destroy it.

What do you think?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!