A list of Xcode launch arguments, environment variables and command line options that help with debugging tasks.
-NSDoubleLocalizedStrings YES: double the length of all localized strings to see how longer languages will affect UI/layout-NSShowNonLocalizedStrings YES: uppercase all nonlocaized strings-AppleLanguages (es): can either be the name of the language (“Spanish”), or its language code (es), but since localization files are keyed by their ISO 639 code, using the code is preferable to the actual name of the language
-com.apple.CoreData.SQLDebug 3: takes a value between 1 and 3, with increasing verbosity-com.apple.CoreData.SyntaxColoredLogging YES-com.apple.CoreData.MigrationDebug
NSZombieEnabledNSDeallocateZombies: actually free the memory of zombie objects, as opposed to secretly retaining them for reporting
MallocScribbleMallocGuardEdgesMallocStackLoggingMallocStackLoggingNoCompact
Prior to Mac OS X 10.5 MallocStackLogging and MallocStackLoggingNoCompact could produce erroneous and misleading results in a multi-threaded program. source
NSUnbufferedIO: don't buffer logging to stdout (sterr is unbuffered by default)
DYLD_FRAMEWORK_PATHDYLD_FALLBACK_FRAMEWORK_PATHDYLD_VERSIONED_FRAMEWORK_PATHDYLD_LIBRARY_PATHDYLD_FALLBACK_LIBRARY_PATHDYLD_VERSIONED_LIBRARY_PATHDYLD_PRINT_TO_FILEDYLD_SHARED_REGIONDYLD_INSERT_LIBRARIESDYLD_FORCE_FLAT_NAMESPACEDYLD_IMAGE_SUFFIXDYLD_PRINT_OPTS(macOS 10.4+)DYLD_PRINT_ENV(macOS 10.4+)DYLD_PRINT_LIBRARIESDYLD_BIND_AT_LAUNCHDYLD_DISABLE_DOFSDYLD_PRINT_APIS(macOS 10.4+)DYLD_PRINT_BINDINGS(macOS 10.4+)DYLD_PRINT_INITIALIZERS(macOS 10.4+)DYLD_PRINT_REBASINGSDYLD_PRINT_SEGMENTS(macOS 10.4+)DYLD_PRINT_STATISTICS(macOS 10.4+)DYLD_PRINT_DOFSDYLD_PRINT_RPATHSDYLD_SHARED_CACHE_DIRDYLD_SHARED_CACHE_DONT_VALIDATEDYLD_ROOT_PATHandDYLD_PATHS_ROOTappear to be synonyms and allow you to reset the "root" for searching for libraries/frameworks/etc. This is available on macOS/iPhoneSimulator but not iOS.DYLD_DISABLE_PREFETCHdisables the pre-fetching of the content of__DATAand__LINKEDITsegments.DYLD_PRINT_LIBRARIES_POST_LAUNCHis the same asDYLD_PRINT_LIBRARIESbut prints them right after launch has finished.DYLD_NEW_LOCAL_SHARED_REGIONSandDYLD_NO_FIX_PREBINDINGare ignored and don't do anything anymore.DYLD_PREBIND_DEBUGprints out debug information on why prebinding was not used.DYLD_PRINT_TO_STDERRonly applies to iOS and forces output to stderr (instead of stdout) to help it show up on console logs.DYLD_PRINT_WEAK_BINDINGSprints debug information on weak bindings.DYLD_PRINT_WARNINGSprints a bunch of warnings (mostly regards to closures and how they are being used).DYLD_PRINT_CS_NOTIFICATIONSprints information about the core symbolicator.DYLD_PRINT_INTERPOSINGprints details about interposes that occur.DYLD_PRINT_CODE_SIGNATURESprints details about code signatures (specifically successes and failures).DYLD_USE_CLOSURESis a dyld3 feature, but doesn't appear to work for anybody non-internal (needCSR_ALLOW_APPLE_INTERNALset).DYLD_IGNORE_PREBINDINGhas three values (all,appandnonsplit) withnonsplitbeing the default if a value is not supplied.DYLD_SKIP_MAINis an apple only feature used for testing dyld (needCSR_ALLOW_APPLE_INTERNALset).
- TODO
- https://nshipster.com/launch-arguments-and-environment-variables/
- https://stackoverflow.com/a/51504440/4789448 for some
dyldenvironment variables - https://developer.apple.com/library/archive/technotes/tn2239/_index.html
- https://developer.apple.com/library/archive/technotes/tn2124/_index.html
man dyld, which can be read for those environment variables lacking descriptions