Skip to content

Add optional debugAsWhichUser to XCScheme.LaunchAction properties.#1100

Open
macblazer wants to merge 1 commit intotuist:mainfrom
macblazer:add-debug-as-which-user
Open

Add optional debugAsWhichUser to XCScheme.LaunchAction properties.#1100
macblazer wants to merge 1 commit intotuist:mainfrom
macblazer:add-debug-as-which-user

Conversation

@macblazer
Copy link
Copy Markdown

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant