<?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/zh-tw/tags/debugging/</link><description>Recent content in Debugging on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Commentary of Takao</copyright><lastBuildDate>Wed, 15 Jul 2026 22:01:08 +0900</lastBuildDate><atom:link href="https://takao.blog/zh-tw/tags/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>使用 git reflog 還原已刪除的分支和提交</title><link>https://takao.blog/zh-tw/web/git-recovery-deleted-branch-reflog/</link><pubDate>Sat, 25 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh-tw/web/git-recovery-deleted-branch-reflog/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-recovery-deleted-branch-reflog-zh-tw.png" alt="Featured image of post 使用 git reflog 還原已刪除的分支和提交" /&gt;&lt;p&gt;“我不小心使用 &lt;code&gt;git branch -D&lt;/code&gt; 刪除了本地分支”，或者“我運行了 &lt;code&gt;git reset --hard HEAD~1&lt;/code&gt; 並丟失了我未推送的提交！”如果您使用 Git 工作過一段時間，您可能經歷過這些令人胃口大開的時刻之一。&lt;/p&gt;</description></item><item><title>具有錯誤邊界的強大前端異常管理</title><link>https://takao.blog/zh-tw/web/frontend-error-boundaries-logging/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh-tw/web/frontend-error-boundaries-logging/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/frontend-error-boundaries-logging-zh-tw.png" alt="Featured image of post 具有錯誤邊界的強大前端異常管理" /&gt;&lt;h2 id="為什麼誤差邊界很重要"&gt;為什麼誤差邊界很重要
&lt;/h2&gt;&lt;p&gt;在 React 應用程式中，元件中一個未捕獲的 JavaScript 錯誤可能會導致整個 UI 崩潰。在錯誤邊界之前，這表示使用者會看到一個白屏，沒有任何錯誤提示。錯誤邊界是 React 元件，可以捕捉子元件樹中任何位置的 JavaScript 錯誤，並呈現後備 UI，而不是崩潰。&lt;/p&gt;</description></item><item><title>找出 Regression Commits Quickly using git bisect</title><link>https://takao.blog/zh-tw/web/git-bisect-debug-regression/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh-tw/web/git-bisect-debug-regression/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-bisect-debug-regression-zh-tw.png" alt="Featured image of post 找出 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;在本文中, 我們將 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>