<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Debugging on Commentary of Takao</title><link>https://takao.blog/en/tags/debugging/</link><description>Recent content in Debugging on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sat, 13 Jun 2026 23:11:50 +0900</lastBuildDate><atom:link href="https://takao.blog/en/tags/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>Recovering Deleted Branches and Commits using git reflog</title><link>https://takao.blog/en/web/git-recovery-deleted-branch-reflog/</link><pubDate>Sat, 25 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-recovery-deleted-branch-reflog/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Recovering Deleted Branches and Commits using git reflog" /&gt;&lt;p&gt;&amp;ldquo;I accidentally deleted a local branch using &lt;code&gt;git branch -D&lt;/code&gt;,&amp;rdquo; or &amp;ldquo;I ran &lt;code&gt;git reset --hard HEAD~1&lt;/code&gt; and lost my unpushed commits!&amp;rdquo; If you have worked with Git for any length of time, you have likely experienced one of these stomach-dropping moments.&lt;/p&gt;
&lt;p&gt;While standard &lt;code&gt;git log&lt;/code&gt; commands won&amp;rsquo;t display references to deleted branches or detached commits, you don&amp;rsquo;t need to panic. Git has a built-in safety net called &lt;strong&gt;&lt;code&gt;git reflog&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Robust Frontend Exception Management with Error Boundaries</title><link>https://takao.blog/en/web/frontend-error-boundaries-logging/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/frontend-error-boundaries-logging/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Robust Frontend Exception Management with Error Boundaries" /&gt;&lt;h2 id="why-error-boundaries-matter"&gt;Why Error Boundaries Matter
&lt;/h2&gt;&lt;p&gt;In React applications, a single uncaught JavaScript error in a component can crash the entire UI. Before Error Boundaries, this meant users would see a white screen with no indication of what went wrong. Error Boundaries are React components that catch JavaScript errors anywhere in their child component tree and render a fallback UI instead of crashing.&lt;/p&gt;
&lt;h2 id="implementing-an-error-boundary"&gt;Implementing an Error Boundary
&lt;/h2&gt;&lt;p&gt;Error Boundaries are class components that implement one or both of the static lifecycle methods &lt;code&gt;getDerivedStateFromError&lt;/code&gt; and &lt;code&gt;componentDidCatch&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Finding Regression Commits Quickly using git bisect</title><link>https://takao.blog/en/web/git-bisect-debug-regression/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-bisect-debug-regression/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Finding Regression Commits Quickly using git bisect" /&gt;&lt;p&gt;&amp;ldquo;It worked yesterday, but it is broken today.&amp;rdquo; In any active software project, regression bugs are bound to slip in. Finding the exact commit that introduced a bug out of hundreds or thousands of commits can feel like searching for a needle in a haystack.&lt;/p&gt;
&lt;p&gt;Instead of manually checking out commits one by one or spending hours analyzing code changes, you can use Git&amp;rsquo;s built-in debugging tool: &lt;strong&gt;&lt;code&gt;git bisect&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this article, we&amp;rsquo;ll explain how to use the binary search algorithm of &lt;code&gt;git bisect&lt;/code&gt; to locate the origin of a bug in minutes.&lt;/p&gt;</description></item></channel></rss>