1

I realize Chrome Developer tools are just HTML elements like any other.

Simple question... is this possible?

<a href='#' onclick='openDevTools()'>Open Chrome Developer Tools</a>

What would openDevTools() contain?

Obviously I know shortcut keys exist.

Jordan Arseno
  • 6,790
  • 8
  • 52
  • 96

1 Answers1

0

No, for security reasons you cannot open built-in DevTools window programmatically.

Yury Semikhatsky
  • 1,785
  • 11
  • 11
  • This hard to believe given that Dev Tools are just HTML elements: http://goo.gl/Qp6Xj -- where's your source? – Jordan Arseno Feb 28 '13 at 17:44
  • It is true that DevTool front-end is actually a web application and you can load it manually by typing chrome-devtools://devtools/devtools.html in the address bar. However, opening URLs with chrome-*:// protocol is blocked for regular pages so you cannot do e.g. window.open("chrome-devtools://devtools/devtools.html") To inspect another page DevTools front-end uses special APIs that are not available to regular web pages. The same front-end can be used for remote debugging in which case the API is exposed via a web socket. – Yury Semikhatsky Mar 01 '13 at 08:02
  • https://code.google.com/p/chromium/source/search?q=file%3Ainspector%2Ffront-end&origq=file%3Ainspector%2Ffront-end&btnG=Search+Trunk – loislo Mar 02 '13 at 07:17