From fc18a171a7a4595fe6f4d5770350a14792786bb4 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Sun, 19 Sep 2021 11:54:53 +0300 Subject: [PATCH] Handle Xcode-specific debug arguments on startup --- UI/NativeApp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 6a526125c1..3f498b2494 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -612,6 +612,13 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch for (int i = 1; i < argc; i++) { if (argv[i][0] == '-') { +#if defined(__APPLE__) + // On Apple system debugged executable may get -NSDocumentRevisionsDebugMode YES in argv. + if (!strcmp(argv[i], "-NSDocumentRevisionsDebugMode") && argc - 1 > i) { + i++; + continue; + } +#endif switch (argv[i][1]) { case 'd': // Enable debug logging