{"id":22452,"date":"2018-08-14T16:10:00","date_gmt":"2018-08-14T20:10:00","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=22452"},"modified":"2018-08-14T16:10:40","modified_gmt":"2018-08-14T20:10:40","slug":"finding-what-code-triggered-a-log-message","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/08\/14\/finding-what-code-triggered-a-log-message\/","title":{"rendered":"Finding What Code Triggered a Log Message"},"content":{"rendered":"<p><a href=\"https:\/\/indiestack.com\/2018\/08\/let-it-rip\/\">Daniel Jalkut<\/a>:<\/p>\n<blockquote cite=\"https:\/\/indiestack.com\/2018\/08\/let-it-rip\/\">\n<p>What this does is add a series of commands that will be run automatically by lldb whenever breakpoint 5 (the one I just set) is hit. This applies to any of the 634 locations that are associated with the regular expression I provided. When the breakpoint is hit, it will first invoke the &ldquo;bt&rdquo; command to print a backtrace of all the calls leading up to this call, and then it will invoke the &ldquo;continue&rdquo; command to keep running the app. After the app has run for a bit, I search the debugger console for &ldquo;!!!&rdquo; which I remembered from the original warning. Locating it, I simply scroll up to see the backtrace command that had most recently been invoked[&#8230;]<\/p>\n<p>[&#8230;]<\/p>\n<p>Next time you&rsquo;re at a loss for how or where something could possibly be happening, consider the possibility of setting a broad, regular expression based breakpoint, and a series of commands to help clarify what&rsquo;s happening when those breakpoints are hit.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Daniel Jalkut: What this does is add a series of commands that will be run automatically by lldb whenever breakpoint 5 (the one I just set) is hit. This applies to any of the 634 locations that are associated with the regular expression I provided. When the breakpoint is hit, it will first invoke the [&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":"2018-08-14T20:10:03Z","apple_news_api_id":"0eafe40c-16e0-4d1b-a873-5b0de653772b","apple_news_api_modified_at":"2018-08-14T20:10:42Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ADq_kDBbgTRuoc1sN5lN3Kw","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":[384,56,317,30,1609,71],"class_list":["post-22452","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-console","tag-debugging","tag-lldb","tag-mac","tag-macos-10-14","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22452","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=22452"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22452\/revisions"}],"predecessor-version":[{"id":22453,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22452\/revisions\/22453"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=22452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=22452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=22452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}