ShowDevTools fired before debugger is ready #125
Description
As discussed in my StackOverflow post, the DevTools is shown before the debugger is ready to start executing breakpoints. This makes it difficult to debug breakpoints in the boot code of an electron app. The only workaround is to add an adhoc timeout to wait until the devtools debugger "should" be ready assert breakpoints in client code.
I found a comment in the atom => devtools shim /atom/brightray/blob/master/browser/inspectable_web_contents_impl.cc where in method InspectableWebContentsImpl::ShowDevTools()
states the following:
// Show devtools only after it has done loading, this is to make sure the
// SetIsDocked is called *BEFORE* ShowDevTools.
The statement "Show devtools only after it has done loading" is not really satisfied IMO as the debugger is not ready to start asserting breakpoints.
Is it possible to look at updating this method so the Dev Tools is tested to see if its ready to start asserting breakpoints before the dev tools is actually shown? Maybe we can add a flag in the package.json that the ShowDevTools method looks for to assert that the debugger is fully ready?