You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
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.
// 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?
The text was updated successfully, but these errors were encountered:
I was reviewing the code and was thinking that it may be more agreeable to all if we were to conditionally spawn a new thread that watches for Dev Tools debugger to be read and once the ready state is detected emit an event back to the user in JavaScript. This way we can turn this on only if specified in package.json and the code will not interrupt the existing execution chain.
I can confirm this bug, the time devtools-opened is emitted is actually when devtools is loaded completely, but debugger only works after a few time later, which I guess is when devtools has setup connection with the inspected page. Chromium didn't expose an event for this, I think it is because people usually open the devtools and then reload to stop at the breakpoint.
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: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?
The text was updated successfully, but these errors were encountered: