diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a785c63..ea8a11501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ BEGIN_UNRELEASED_TEMPLATE ### Fixed -* TBD +* Fixed Xcode navigation for stack trace paths with leading slash: [#3290](https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/3290) ### Ruleset Development Changes @@ -56,7 +56,7 @@ END_UNRELEASED_TEMPLATE ### Fixed -* TBD +* Fixed Xcode navigation for stack trace paths with leading slash: [#3290](https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/3290) ### Ruleset Development Changes diff --git a/xcodeproj/internal/bazel_integration_files/create_lldbinit.sh b/xcodeproj/internal/bazel_integration_files/create_lldbinit.sh index 18694f57a..a0fe2f21a 100755 --- a/xcodeproj/internal/bazel_integration_files/create_lldbinit.sh +++ b/xcodeproj/internal/bazel_integration_files/create_lldbinit.sh @@ -29,6 +29,10 @@ echo "settings append target.source-map ./external/ \"$BAZEL_EXTERNAL\"" # `external` when set from swiftsourcefile echo "settings append target.source-map ./external/ \"$build_external\"" +# Workspace-relative paths with leading slash (e.g., /Projects/...) +# These appear in debug symbols and need to be mapped to the workspace root +echo "settings append target.source-map \"/\" \"$execution_root/\"" + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then readonly output_base="${execution_root%/*/*}"