How to "build and run" without binding to gdb in Xcode?

For both iPhone and desktop applications, when you select Build and Run from the Run menu (or press cmd + return), Xcode launches gdb and then launches the application with gdb attached. This allows you to check the status of the stack if the program crashes, but adds significant overhead to the time the program starts, which is somewhat useless if your program does not crash.

Is there a way to enable the Create and Run command to just build and run the application from the outside, without being bound to gdb? I tried Googling and apologize for the help of Xcode, but to no avail ...

Thank!

+3
source share
3 answers

The correct answer is to choose Project> Edit Active Executable and the Debug Tab

Uncheck the "Automatically attach debugger on failure" box. When this is checked, Xcode runs your application under gdb, even when breakpoints are disabled, even if the Release configuration is configured, so if your application crashes, you can see the backtrace in the debugger, not in CrashTracer. If you uncheck this box, it will not start in gdb unless you are debugging.

+4
source

Switch to the release version of your goal?

-2
source

"Release".

-3

Source: https://habr.com/ru/post/1726694/


All Articles