Title: [Bug]: Build tools inject hardcoded -configuration Debug, overriding the scheme's configuration · Issue #443 · getsentry/XcodeBuildMCP · GitHub
Open Graph Title: [Bug]: Build tools inject hardcoded -configuration Debug, overriding the scheme's configuration · Issue #443 · getsentry/XcodeBuildMCP
X Title: [Bug]: Build tools inject hardcoded -configuration Debug, overriding the scheme's configuration · Issue #443 · getsentry/XcodeBuildMCP
Description: Bug Description When no configuration is provided (neither as a tool parameter nor a session default), every build/test/path tool injects -configuration Debug into the xcodebuild invocation. This overrides the configuration that the sche...
Open Graph Description: Bug Description When no configuration is provided (neither as a tool parameter nor a session default), every build/test/path tool injects -configuration Debug into the xcodebuild invocation. This o...
X Description: Bug Description When no configuration is provided (neither as a tool parameter nor a session default), every build/test/path tool injects -configuration Debug into the xcodebuild invocation. This o...
Opengraph URL: https://github.com/getsentry/XcodeBuildMCP/issues/443
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Build tools inject hardcoded -configuration Debug, overriding the scheme's configuration","articleBody":"### Bug Description\n\nWhen no `configuration` is provided (neither as a tool parameter nor a session default), every build/test/path tool injects `-configuration Debug` into the `xcodebuild` invocation. This overrides the configuration that the scheme's Run action would otherwise select.\n\n`xcodebuild`, run on its own, picks the configuration from the scheme. By always passing `-configuration Debug`, XcodeBuildMCP forces resolution against `Debug.xcconfig` instead of the scheme's actual Run configuration. In a project where the scheme's Run action uses a custom configuration (e.g. `Debug-dev`), this produces the wrong build settings — including the wrong bundle identifier.\n\nConcrete example from a real project:\n- Scheme's Run action configuration: `Debug-dev` -\u003e `Development.xcconfig` -\u003e `com.example.app.dev` (expected)\n- Forced `-configuration Debug` -\u003e `Debug.xcconfig` -\u003e `com.example.app` (what actually gets built)\n\n### Debug Output\n\n```\n⚙️ XcodeBuildMCP Doctor\n\n Generated: 2026-06-03T14:21:14.316Z\n Server Version: 2.6.2\n Output Mode: Redacted (default)\n\nSystem Information\n platform: darwin\n release: 25.5.0\n arch: arm64\n cpus: 10 x Apple M1 Pro\n memory: 32 GB\n\nNode.js Information\n version: v25.2.1\n platform: darwin\n arch: arm64\n\nXcode Information\n version: Xcode 26.5 - Build version 17F42\n path: /Applications/Xcode-26.5.0.app/Contents/Developer\n selectedXcode: /Applications/Xcode-26.5.0.app/Contents/Developer/usr/bin/xcodebuild\n xcrunVersion: xcrun version 72.\n\nDependencies\n axe: 1.7.1\n mise: 2026.5.18 macos-arm64 (2026-05-31)\n\nEnvironment Variables\n XCODEBUILDMCP_RUNTIME: cli\n XCODEBUILDMCP_SILENCE_LOGS: true\n\nUI Automation (axe)\n Available: Yes\n UI Automation Supported: Yes\n\nManifest Tool Inventory\n Total Unique Tools: 82\n Workflow Count: 15\n\nTool Availability Summary\n Build Tools: Available\n UI Automation Tools: Available\n Incremental Build Support: Not available\n\nSentry\n Sentry enabled: Yes\n\n✅ Doctor diagnostics complete\n```\n\n### Editor/Client\n\nClaude Code\n\n### MCP Server Version\n\n2.6.2\n\n### LLM\n\nClaude Opus 4.8\n\n### MCP Configuration\n\n```json\n\"XcodeBuildMCP\": {\n \"args\": [\n \"-y\",\n \"xcodebuildmcp@latest\",\n \"mcp\"\n ],\n \"command\": \"npx\",\n \"env\": {},\n \"type\": \"stdio\"\n }\n```\n\n### Steps to Reproduce\n\n1. Use a project whose scheme's Run action is set to a non-`Debug` configuration (e.g. `Debug-dev`).\n2. Ask the agent to build for simulator/device without specifying a `configuration`, and without a `configuration` session default set.\n3. Inspect the generated `xcodebuild` command in the build log.\n\n### Expected Behavior\n\nWhen neither an explicit `configuration` argument nor a session default is set, `-configuration` should be omitted so `xcodebuild` honors the scheme's configuration for the chosen action.\n\n### Actual Behavior\n\n`-configuration Debug` is always passed, silently overriding the scheme and producing the wrong build settings/bundle id for projects whose scheme uses a non-`Debug` Run configuration.\n\nRoot cause:\n\n```ts\n// src/mcp/tools/simulator/build_sim.ts:103 (same pattern in device/macos/clean/path tools)\nconst configuration = params.configuration ?? 'Debug';\n```\n\n```ts\n// src/utils/build-utils.ts:97 — pushed unconditionally\ncommand.push('-configuration', params.configuration);\n```\n\n`SharedBuildParams.configuration` is typed as required `string` (`src/types/common.ts:135`), so no code path omits the flag. Session defaults allow `configuration: string | null` and only merge concrete non-null values, so an unset configuration always falls through to the hardcoded `Debug`.\n\n### Error Messages\n\n(none — silent wrong-config build)\n","author":{"url":"https://github.com/hujunfeng","@type":"Person","name":"hujunfeng"},"datePublished":"2026-06-03T14:27:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/443/XcodeBuildMCP/issues/443"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ddcfa27-7423-cd11-d1c7-947af729f3dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBDA:312530:13D7F07:1B92E4A:6A4CAE2C |
| html-safe-nonce | b61e84e078b683de6cc345aba58239995721c984161cef06f283e4dc1899e2c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkRBOjMxMjUzMDoxM0Q3RjA3OjFCOTJFNEE6NkE0Q0FFMkMiLCJ2aXNpdG9yX2lkIjoiNTA5OTgwMzk0MjM5MDExNTg4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 788f5e483af267b970f8f3e9f7f08140be90a7f808f6f28ec1023f903f0f80ab |
| hovercard-subject-tag | issue:4580764313 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/XcodeBuildMCP/443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19d97394de6b27d6851742b23309219c14c39e7b5a793f31129f3dd5292d514d/getsentry/XcodeBuildMCP/issues/443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19d97394de6b27d6851742b23309219c14c39e7b5a793f31129f3dd5292d514d/getsentry/XcodeBuildMCP/issues/443 |
| og:image:alt | Bug Description When no configuration is provided (neither as a tool parameter nor a session default), every build/test/path tool injects -configuration Debug into the xcodebuild invocation. This o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hujunfeng |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/XcodeBuildMCP git https://github.com/getsentry/XcodeBuildMCP.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 945551361 |
| octolytics-dimension-repository_nwo | getsentry/XcodeBuildMCP |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 945551361 |
| octolytics-dimension-repository_network_root_nwo | getsentry/XcodeBuildMCP |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width