{"record":{"id":"a2307c5e5c730e57","repo":"nodejs/node","slug":"stabs-debug-format-is-not-supported-yet","errorCode":null,"errorMessage":"stabs debug format is not supported yet.","messagePattern":"stabs debug format is not supported yet\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"tools/gyp/pylib/gyp/xcode_emulation.py","lineNumber":613,"sourceCode":"            if self._Settings()[\"GCC_DYNAMIC_NO_PIC\"] == \"YES\":\n                cflags.append(\"-mdynamic-no-pic\")\n        else:\n            pass\n            # TODO: In this case, it depends on the target. xcode passes\n            # mdynamic-no-pic by default for executable and possibly static lib\n            # according to mento\n\n        if self._Test(\"GCC_ENABLE_PASCAL_STRINGS\", \"YES\", default=\"YES\"):\n            cflags.append(\"-mpascal-strings\")\n\n        self._Appendf(cflags, \"GCC_OPTIMIZATION_LEVEL\", \"-O%s\", default=\"s\")\n\n        if self._Test(\"GCC_GENERATE_DEBUGGING_SYMBOLS\", \"YES\", default=\"YES\"):\n            dbg_format = self._Settings().get(\"DEBUG_INFORMATION_FORMAT\", \"dwarf\")\n            if dbg_format == \"dwarf\":\n                cflags.append(\"-gdwarf-2\")\n            elif dbg_format == \"stabs\":\n                raise NotImplementedError(\"stabs debug format is not supported yet.\")\n            elif dbg_format == \"dwarf-with-dsym\":\n                cflags.append(\"-gdwarf-2\")\n            else:\n                raise NotImplementedError(\"Unknown debug format %s\" % dbg_format)\n\n        if self._Settings().get(\"GCC_STRICT_ALIASING\") == \"YES\":\n            cflags.append(\"-fstrict-aliasing\")\n        elif self._Settings().get(\"GCC_STRICT_ALIASING\") == \"NO\":\n            cflags.append(\"-fno-strict-aliasing\")\n\n        if self._Test(\"GCC_SYMBOLS_PRIVATE_EXTERN\", \"YES\", default=\"NO\"):\n            cflags.append(\"-fvisibility=hidden\")\n\n        if self._Test(\"GCC_TREAT_WARNINGS_AS_ERRORS\", \"YES\", default=\"NO\"):\n            cflags.append(\"-Werror\")\n\n        if self._Test(\"GCC_WARN_ABOUT_MISSING_NEWLINE\", \"YES\", default=\"NO\"):\n            cflags.append(\"-Wnewline-eof\")","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/gyp/pylib/gyp/xcode_emulation.py#L595-L631","documentation":"Raised by XcodeSettings._GetDebuggingFlags when the build target's xcode_settings specify DEBUG_INFORMATION_FORMAT as 'stabs'. GYP's Xcode emulation only supports the 'dwarf' and 'dwarf-with-dsym' debug info formats; the legacy 'stabs' format was deprecated by Apple and is not implemented. This surfaces when generating a Makefile/ninja project from a .gyp file that carries stabs-format settings inherited from an old Xcode project.","triggerScenarios":"A gyp target configuration has xcode_settings containing 'DEBUG_INFORMATION_FORMAT': 'stabs' while GCC_GENERATE_DEBUGGING_SYMBOLS is 'YES' (or unset, since it defaults to YES). The _Appendcflags logic hits the elif branch for 'stabs' and raises NotImplementedError.","commonSituations":"Porting an old Xcode project (pre-LLDB era) into gyp where stabs was the default debug format. Copying legacy xcconfig settings into a .gyp file without modernizing them. Stabs has been effectively unsupported on macOS since the move to LLDB/dwarf.","solutions":["Set DEBUG_INFORMATION_FORMAT to 'dwarf' in the target's xcode_settings (the modern default).","If you need separate dSYM bundles, set DEBUG_INFORMATION_FORMAT to 'dwarf-with-dsym'.","Remove the DEBUG_INFORMATION_FORMAT key entirely so it falls back to the 'dwarf' default.","If you genuinely need stabs, you must patch xcode_emulation.py to add a cflags mapping for it, but this is not recommended."],"exampleFix":"# before\n'xcode_settings': {\n  'DEBUG_INFORMATION_FORMAT': 'stabs',\n}\n# after\n'xcode_settings': {\n  'DEBUG_INFORMATION_FORMAT': 'dwarf',\n}","handlingStrategy":"validation","validationCode":"# Before generating, validate xcode_settings debug format\nfmt = target_config.get('xcode_settings', {}).get('DEBUG_INFORMATION_FORMAT')\nif fmt == 'stabs':\n    raise ValueError('stabs is unsupported; use dwarf or dwarf-with-dsym')","typeGuard":null,"tryCatchPattern":"try:\n    gyp.ProcessFile(...)\nexcept NotImplementedError as e:\n    if 'stabs' in str(e):\n        # fix config and retry\n        ...","preventionTips":["Always set DEBUG_INFORMATION_FORMAT to 'dwarf' (or omit it) in modern gyp configs.","Avoid importing legacy Xcode debug settings verbatim into gyp."],"tags":["xcode","gyp","macos","debugging","configuration"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}