{"id":13995507,"url":"https://github.com/twostraws/Sharpshooter","last_synced_at":"2025-07-22T22:31:01.190Z","repository":{"id":47345361,"uuid":"107052567","full_name":"twostraws/Sharpshooter","owner":"twostraws","description":"A tiny Xcode extension for people who debug with print().","archived":false,"fork":false,"pushed_at":"2020-06-10T14:56:37.000Z","size":17,"stargazers_count":119,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-19T18:17:30.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.hackingwithswift.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twostraws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-15T22:05:11.000Z","updated_at":"2025-01-17T10:12:24.000Z","dependencies_parsed_at":"2022-09-10T03:23:36.088Z","dependency_job_id":null,"html_url":"https://github.com/twostraws/Sharpshooter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/twostraws/Sharpshooter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twostraws%2FSharpshooter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twostraws%2FSharpshooter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twostraws%2FSharpshooter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twostraws%2FSharpshooter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twostraws","download_url":"https://codeload.github.com/twostraws/Sharpshooter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twostraws%2FSharpshooter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266585663,"owners_count":23952163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:27.155Z","updated_at":"2025-07-22T22:31:00.568Z","avatar_url":"https://github.com/twostraws.png","language":"Swift","funding_links":[],"categories":["Swift","The list"],"sub_categories":["Helper on editing"],"readme":"# Sharpshooter\n\nSharpshooter is an Xcode extension for Swift developers who like to debug code by inserting `print()` statements everywhere, which is totally not *you*, right?\n\nThe name comes from a joke about a Texan sharpshooter who fires  gunshots at the door of a barn, then draws a target around the biggest cluster of hits and claims to be a sharpshooter – a pretty accurate analogy for finding bugs using `print()`, I think.\n\nIt has only two features: Add Comments places `print()` calls at the start of all your methods, and Remove Comments removes the `print()` calls that were inserted.\n\nHere’s an example of code before adding comments:\n\n    class BrokenStuff {\n        func broken() {\n            print(\"\u003cSilent screaming\u003e\")\n        }\n    \n        private func reallyBroken() {\n            print(\"\u003cTears\u003e\")\n        }\n    \n        static private func superBroken() {\n            print(\"\u003cSilent screaming *and* tears\u003e\")\n        }\n    }\n\nAnd after:\n\n    class BrokenStuff {\n        func broken() {\n            print(\"# Sharpshooter: Entering broken()\")\n            print(\"\u003cSilent screaming\u003e\")\n        }\n    \n        private func reallyBroken() {\n            print(\"# Sharpshooter: Entering reallyBroken()\")\n            print(\"\u003cTears\u003e\")\n        }\n    \n        static private func superBroken() {\n            print(\"# Sharpshooter: Entering superBroken()\")\n            print(\"\u003cSilent screaming and tears\u003e\")\n        }\n    }\n\n## Installation\n\nXcode extensions are compiled as part of a basically useless macOS app. I've built the extension for you and in theory it should work:\n\n1. Go to [the latest release](https://github.com/twostraws/Sharpshooter/releases/latest)\n2. Download and extract the zip.\n3. Move Sharpshooter.app to your Mac's Applications directory. You may need to launch the app at least once to register its extension.\n4. Relaunch Xcode.\n\nTo build the extension from scratch you need to:\n\n1. Clone this repository.\n2. Activate your team for signing both the macOS app and the extension.\n3. Build the macOS app.\n4. Move the built macOS app to your Mac’s Applications folder. You may need to launch the app at least once to register its extension.\n5. Relaunch Xcode.\n\nYou can check that the extension is installed by going to your Mac's system preferences, choosing Extensions \u003e Xcode Source Editor, and verifying that there's a check next to Sharpshooter.\n\n## Contributing\n\nContributions are welcome as pull requests. You can file issues if you want, but realistically it’s probably better for everyone if you just fix the issue and open a pull request – the code is really simple.\n\n## License\n\nMIT, natch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwostraws%2FSharpshooter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwostraws%2FSharpshooter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwostraws%2FSharpshooter/lists"}