build-run-debug
Installation
SKILL.md
Build, run, debug
Own the workflow with one project-local script/build_and_run.sh (never inside app source dirs). Other tools may depend on its contract.
- Default path is kill the running app, build, launch. Optional flags:
--debug(lldb),--logs(stream process logs),--telemetry(unified log filtered to app subsystem),--verify(launch, thenpgrep -x <AppName>). - Xcode projects use
xcodebuild. SwiftPM command-line tools launch raw. - SwiftPM GUI apps must be staged as
dist/<AppName>.app(binary inContents/MacOS, minimalInfo.plistwithCFBundlePackageType=APPL,CFBundleExecutable,CFBundleIdentifier,CFBundleName,LSMinimumSystemVersion,NSPrincipalClass=NSApplication) and launched with/usr/bin/open -n. A raw executable gives no Dock icon, no activation, and bundle id warnings. If the window stays behind, checkNSApp.setActivationPolicy(.regular)andNSApp.activate(ignoringOtherApps: true). - Run
git initonly if the workspace is not already inside a git repo. Never nest one. - Classify failures (compiler, linker, signing, build settings, SDK, script, runtime launch) and quote the smallest useful error. No simulator or mobile workflows on macOS. Do not claim UI state you cannot inspect.