Skip to content

feat: add optional debugAsWhichUser to XCScheme.LaunchAction#1100

Merged
fortmarek merged 2 commits intotuist:mainfrom
macblazer:add-debug-as-which-user
Apr 12, 2026
Merged

feat: add optional debugAsWhichUser to XCScheme.LaunchAction#1100
fortmarek merged 2 commits intotuist:mainfrom
macblazer:add-debug-as-which-user

Conversation

@macblazer
Copy link
Copy Markdown
Contributor

@macblazer macblazer commented Apr 6, 2026

Short description 📝

As a developer I want to be able to control the "Debug Process as..." setting within the Run action of a scheme so that I can easily construct projects that will launch scripts as root or test multi-user macOS apps.

Solution 📦

I first created a proof-of-concept scheme and used Xcode's GUI to set the "Debug Process as.." setting to "root". Then I looked at the resulting .xcscheme file and saw that it used an XML property named "debugAsWhichUser". I added that property to the XCScheme.LaunchAction type which models the Run action from the scheme file.

Implementation 👩‍💻👨‍💻

Detail in a checklist the steps that you took to implement the PR.

  • Added the optional property.
  • Added a fixture .xcscheme file to the unit tests that is copied from Xcode's GUI creation of schemes.
  • Added unit tests showing the XCScheme.LaunchAction.debugAsWhichUser property is both read from and written to .xcscheme files.
  • All other unit tests pass with no changes.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 6, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fortmarek fortmarek changed the title Add optional debugAsWhichUser to XCScheme.LaunchAction properties. feat: add optional debugAsWhichUser to XCScheme.LaunchAction Apr 12, 2026
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 12, 2026
Copy link
Copy Markdown
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry for taking longer to review this one 🙏

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 12, 2026
@fortmarek fortmarek merged commit 46fb0d7 into tuist:main Apr 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants