From f7e8c718d7de43ccc6dbe157ca59f644864c78cb Mon Sep 17 00:00:00 2001 From: tinder-hemanthprasad Date: Tue, 17 Mar 2026 16:31:24 -0700 Subject: [PATCH] Fix Xcode navigation for stack trace paths with leading slash Fixes #3290 Made-with: Cursor --- CHANGELOG.md | 4 ++-- xcodeproj/internal/bazel_integration_files/create_lldbinit.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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%/*/*}"