Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Xcode opens multiple Terminal windows when running app

Whenever I run anything in xcode it opens an extra terminal that runs the program then exits immediately, but the app still runs through the normal xcode launch. It's not a huge issue but It's getting really annoying to realize I have like 7 windows of terminal open that are just doing nothing.

Has anyone had this issue before?

Answered by Etresoft in 824672022

That is not normal behaviour. The only time I've seen that is when Xcode is configured to run the app in a separate terminal for something like ncurses that won't work in the debug console. Check the run scheme's "Options" setting for "Console".

That is not normal behaviour. The only time I've seen that is when Xcode is configured to run the app in a separate terminal for something like ncurses that won't work in the debug console. Check the run scheme's "Options" setting for "Console".

In my case, in Xcode 16 or later, I open the project and reproduce it on the second and subsequent RUNs. This phenomenon did not exist until Xcode 15.4.

Check the run scheme's "Options" setting for "Console".

This setting opens a window that displays the normal log, and a separate window that runs for a short time and then quits.

Does anyone know how to fix it?

I found a workaround in the case of a Command Line Tool which opens a window with SDL2.

Create an App project. However, main() does not call NSApplicationMain().

"-NSDocumentRevisionsDebugMode" and "YES" are passed to argv, so ignore them.

I ran into the same problem. Thanks to your work I could find out another workaround: I found in the Scheme options page the setting "Queue Debugging / Enable backtrace recording". Switching that off eventually worked for me.

Xcode opens multiple Terminal windows when running app
 
 
Q