{"id":37305,"date":"2022-10-12T16:32:14","date_gmt":"2022-10-12T20:32:14","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=37305"},"modified":"2022-10-12T16:32:14","modified_gmt":"2022-10-12T20:32:14","slug":"subclassing-for-debugging","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/10\/12\/subclassing-for-debugging\/","title":{"rendered":"Subclassing for Debugging"},"content":{"rendered":"<p><a href=\"https:\/\/paul-samuels.com\/blog\/2022\/10\/06\/add-name-for-debugging\/\">Paul Samuels<\/a>:<\/p>\n<blockquote cite=\"https:\/\/paul-samuels.com\/blog\/2022\/10\/06\/add-name-for-debugging\/\">\n<p>A really useful trick when debugging is to subclass the thing you are interested in just to make it easier to search for inside the various debugging tools.<\/p>\n<p>[&#8230;]<\/p>\n<p>There are plenty more places like instruments, logging etc to make use of this technique.<\/p>\n<\/blockquote>\n<p>It can also be useful to subclass to override <code>-retain<\/code> and <code>-release<\/code> so you can easily see when they are being called. However, this is only possible if your class inherits from an Objective-C class that you control.<\/p>","protected":false},"excerpt":{"rendered":"<p>Paul Samuels: A really useful trick when debugging is to subclass the thing you are interested in just to make it easier to search for inside the various debugging tools. [&#8230;] There are plenty more places like instruments, logging etc to make use of this technique. It can also be useful to subclass to override [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-10-12T20:32:17Z","apple_news_api_id":"732022d5-431c-4133-8f92-efcf71401f24","apple_news_api_modified_at":"2022-10-12T20:32:18Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AcyAi1UMcQTOPku_PcUAfJA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[56,30,2077,571,54,71,901,226],"class_list":["post-37305","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-debugging","tag-mac","tag-macos-12","tag-memory-management","tag-objective-c","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=37305"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37305\/revisions"}],"predecessor-version":[{"id":37306,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37305\/revisions\/37306"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=37305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=37305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=37305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}