<?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 每日拍拍</title>
    <link>https://dailypypy.org/tags/debugging/</link>
    <description>Recent content in Debugging on 每日拍拍</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <copyright>© 2026 每日拍拍</copyright>
    <lastBuildDate>Sat, 25 Apr 2026 12:33:00 +0800</lastBuildDate><atom:link href="https://dailypypy.org/tags/debugging/index.xml" rel="self" type="application/rss+xml" />
    <follow_challenge>
      <feedId>155076163427069952</feedId>
      <userId>154825760438254592</userId>
    </follow_challenge>
    
    
    <item>
      <title>Git bisect 實戰：快速定位壞 commit 與除錯流程完全攻略</title>
      <link>https://dailypypy.org/learn/git-bisect/</link>
      <pubDate>Sat, 25 Apr 2026 12:33:00 +0800</pubDate>
      
      <guid>https://dailypypy.org/learn/git-bisect/</guid>
      <description>&lt;!---
1024x616
prompt: masterpiece, best quality, highres, clean anime illustration, japanese anime style, soft shading, flat color design, 1girl, black hair, green eyes, white off-shoulder shirt, black short skirt, wide shot, small figure, holding magnifying glass, focused detective expression, looking at viewer, pastel periwinkle background, neat composition, detailed eyes, cute and smart vibe, minimal background, polished illustration, no text
negative prompt: worst quality, bad eye, bad hand, extra limbs, manga, multiple views, monochrome, text, signature
---&gt;
&lt;p&gt;每個專案都會遇到這種狀況：昨天還好好的，今天測試突然紅一片。 你打開 &lt;code&gt;git log&lt;/code&gt;，發現中間有二十幾個 commit。 每個 commit message 看起來都很無辜，但每個又都有一點可疑。
「refactor config loader」很可疑。 「small cleanup」也很可疑。 「fix typo」最可疑，因為它通常不只修 typo。
這時候如果靠猜，拍拍君保證你會開始懷疑人生。 更好的方法是讓 Git 幫你玩二分搜尋。 這就是 &lt;code&gt;git bisect&lt;/code&gt;。
它可以在一段 commit 歷史裡，自動縮小範圍，找出第一個把程式弄壞的 commit。 不是靠玄學，不是靠直覺，是很樸素、很可靠的二分搜尋。 今天這篇就來完整拆解 &lt;code&gt;git bisect&lt;/code&gt;：從手動判定，到用測試腳本自動找壞 commit。
學完之後，你看到 regression 不會再只想重開機或喝咖啡。 你會很冷靜地說：「交給 bisect 吧。」&lt;/p&gt;</description>
      <media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://dailypypy.org/learn/git-bisect/featured.png" />
    </item>
    
  </channel>
</rss>
