"Debug XPC Services" causing premature termination?

When running on macOS 10.14 and Xcode 10 (both beta 2), my application appears to randomly terminate. However: exit() isn't called, abort() isn't called, no exceptions are thrown, NSApplicationMain() doesn't return. There is no indication that the app has encountered an issue, there are no console messages.


The termination seems to be linked to the "Debug XPC services used by this application" setting. If I turn it off, all is well.


Has anybody else seen this behavior? My current theory is that one of my XPC services terminates due to inactivity, but Xcode interprets this as "hey, I should end the debugging session" and terminates the main app as well.


Are there any environmental variables that I can set to gather additional logs?


Thanks!

Follow up: whenever the XPC service is killed (either automatically by the system or manually via a kill command in console), Xcode stops the debugging session and terminates the main app.


I filed 41412209.

"Debug XPC Services" causing premature termination?
 
 
Q