Can I programmatically open the devtools from a Google Chrome extension?
It seems unlikely that this is possible or will ever become possible,
check this:https://code.google.com/p/chromium/issues/detail?id=112277
which says:"We only allow explicit devtools opening."
Yes you can (or not) using the experimental APIs chrome.experimental.webInspector
.
http://code.google.com/chrome/extensions/experimental.html
You can even change the content and panels of it.
Note that you will not able submit extensions that use experimental APIs.
This is quite old but since I stumbled upon it now searching for a solution I figured others might have too. Since Chrome 28 you can use the devtools.* API. This allows you to open and manipulate DevTools panels. It is also notable no longer expirimental.