<?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/tags/debugging/</link><description>Recent content in Debugging on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>zh</language><copyright>Commentary of Takao</copyright><lastBuildDate>Wed, 15 Jul 2026 22:01:08 +0900</lastBuildDate><atom:link href="https://takao.blog/zh/tags/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>使用 git reflog 恢复已删除的分支和提交</title><link>https://takao.blog/zh/web/git-recovery-deleted-branch-reflog/</link><pubDate>Sat, 25 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-recovery-deleted-branch-reflog/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-recovery-deleted-branch-reflog-zh.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/web/frontend-error-boundaries-logging/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/frontend-error-boundaries-logging/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/frontend-error-boundaries-logging-zh.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>使用 git bisect 快速查找回归提交</title><link>https://takao.blog/zh/web/git-bisect-debug-regression/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-bisect-debug-regression/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-bisect-debug-regression-zh.png" alt="Featured image of post 使用 git bisect 快速查找回归提交" /&gt;&lt;p&gt;“昨天还能用，今天就坏了。”在任何活跃的软件项目中，回归错误都必然会出现。从数百或数千个提交中查找引入错误的确切提交就像大海捞针一样。&lt;/p&gt;
&lt;p&gt;您可以使用 Git 的内置调试工具：&lt;strong&gt;&lt;code&gt;git bisect&lt;/code&gt;&lt;/strong&gt;，而不是手动一一检查提交或花费数小时分析代码更改。&lt;/p&gt;</description></item></channel></rss>