-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Mac: Brackets won't quit in subsequent sessions after using Dev Tools #5989
Comments
I'm seeing this too on 10.7. But in step 2 I don't open the unit test window, I just go straight to Debug > Show Developer Tools. |
@jasonsanjose are you running OSX 10.9 as well? Just wondering if it's something new with 10.9 |
N/M @jasonsanjose -- I see you e-mail now that you see it on 10.7 |
@redmunds would this closed PR fix this? adobe/brackets-shell#374 |
@fungl164 Can you take a look at this one? |
@jasonsanjose I was just trying that. I'm not sure why, but Dev Tools still open in Chrome live-dev profile with that branch (randy/dev-tools-no-debug-connection), so problem is not fixed. |
Doh! I forgot to rebuild. That branch does fix it if Chrome is not running, but Dev Tools fail to launch if Chrome is already running. I'll play around with it. |
Updated title to clarify that this only occurs in dev tools related workflows. |
I can also hit problem with this scenario:
So, opening Dev Tools in Chrome with default profile may not be enough to fix this problem because you can manually open Dev Tools in Chrome window with live-dev profile. |
Note that this only happens on Mac. When I try to reproduce on Windows, when Brackets is shutdown, I see a message in Chrome Dev Tools window: "Detached from Target. Remote Debugging has been terminated with reason target_closed. Please re-attach to new target". I don't see that message in Chrome window on Mac. |
@redmunds et al. I'm on #brackets irc if you want to chat... |
Based on the symptoms and behavior, I believe the problem is most likely that the native app is for some reason not closing the main window. I'm not sure if this is the proper place to force quit the app on exit, but if seems to fix the problem. see (https://github.com/fungl164/brackets-shell/tree/devtools-close) |
@redmunds this should work without any changes to the current master (e.g. no gist edits) |
@fungl164 Thanks for continuing to look at this. The problem is definitely that Brackets is not properly terminating. Unfortunately your suggestion won't work in the case where there are unsaved documents at shutdown. Instead of prompting user to save documents, it shuts down immediately so unsaved changes are lost. |
@redmunds is there some code already available that can be called to ensure files are saved (either in the appshell or in brackets)? |
@fungl164 Yes, but it's getting caught in the infinite messaging loop, so it never makes it to termination. |
@redmunds which loop? can you point me to it? |
Do we need to go so far as specifically opening Chrome for dev tools? Looking at the old sprint 33 code, we don't need any of the flags that we used to pass:
And in sprint 34, we certainly don't need
It seems like overkill for Only brackets devs and extension authors will use dev tools. Given that assumption, it's not a terrible experience for those targeted users to end up in the wrong browser if they happen to not use Chrome or Safari as their default browser. |
@jasonsanjose we tried that last night. The problem comes down to how the shared workspace chooses the browser instance to open the URL arg. It basically picks the last active window, so if the LiveDev instance had the last focus, we still have the same problem. |
@fungl164 It's not a simple loop. brackets-shell sends FILE_CLOSE_WINDOW message to brackets, which ultimately either returns with FILE_CLOSE or APP_ABORT_QUIT (but I may have the order reversed). In the middle of this process may be other messages to save files to disk. @jasonsanjose We worked on this last night. I was going to explain the status at the 10am standup. |
Changed this to High Priority and Sprint 34 Milestone. |
@redmunds we may have a shot at fixing it if we look at implementing |
@fungl164 Need the brackets UI to prompt user to Save, Discard, or Cancel, so I don't think that will work. |
Plan B is in place, reverting the 3 pull requests related to the chrome profile changes: adobe/brackets-shell#381. Testing the build now. |
@redmunds if anything, it could at least delay actual app close until all outstanding file saves are done by returning an NSTerminateLater; but ok if its not worth it. |
@fungl164 Sorry, but we ran out of time for Sprint 34 and have to backout this feature. Thanks again for your effort. For Sprint 35, hopefully we get Dev Tools working in a Brackets window so we don't have to worry about this. Otherwise, we'll need to fix this bug. |
Might be too late for the party, but check out https://github.com/fungl164/brackets-shell/compare/fungl164;chrome-live-osx-2 for a possible fix. Can safely ignore https://github.com/fungl164/brackets-shell/tree/devtools-close |
Closing. |
results:
At step 3 I'd expect my chrome dev tools to close. But they stay open
At step 5 I'd expect brackets to quit via CMD-Q or via Quit from menu
Env OSX 10.7, 10.8, 10.9
Slightly simplified steps:
Results:
Bracket won't quit
The text was updated successfully, but these errors were encountered: