Skip to content

When the TNS process is finished - terminate the debugger process, too. #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

yyosifov
Copy link
Contributor

@yyosifov yyosifov commented Apr 13, 2017

When the TNS process has been closed we're still hanging the debugger as if you can still do something.

This is easily reproducible if there is need for interactive input from the user. For example if you have two provisioning profiles and run launch ios from the app it will try to find a provisioning profile for you, get confused, can't get a decision and return an error for you to pass the teamId as an arg. After that the TNS exits. Currently we hang, now we raise the terminate event.

Another way to test:

  • Run IOS in Simulator
  • Close the Simulator. The process should be terminated.

Copy link
Contributor

@ivanbuhov ivanbuhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some cases e.g. when selecting Attach on Android (tns debug android --start is executed under the hood) the CLI process exists and this is the expected behaviour - in such cases we should not fire a TerminatedEvent. Maybe we can fire the event only if the CLI process exits with a non-zero code or just put it in a if( not "Attach on Android") clause.

@yyosifov
Copy link
Contributor Author

@ivanbuhov great catch! I've added your comment + condition for code > 0 to handle this case

@yyosifov yyosifov merged commit 4f44e26 into master Apr 13, 2017
@pkoleva pkoleva deleted the yosifov/terminate-debugger-on-exit branch May 18, 2017 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants