惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
B
Blog RSS Feed
C
Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
K
Kaspersky official blog
D
Docker
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
Tenable Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
H
Help Net Security
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
美团技术团队
腾讯CDC

博客园 - Freedom

ebook site XML Namespaces and How They Affect XPath and XSLT Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-Books Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-Prerequisites to Debugging NET垃圾回收机制 A Software Developer’s Reading Plan 浅析.NET中的Serialization #if (C# Reference) VS 2008 常用快捷键! One Day-XML:XML Schema 参考手册 One Day-XML:XSLT One Day-XML:WAP One Day-XML:Web Services One Day-XML:WSDL One Day-XML:RDF One Day-XML:RSS One Day-XML:XForms One Day-XML:SOAP One Day-XML:XML DOM
Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-The Debugging Process
Freedom · 2010-05-24 · via 博客园 - Freedom
  • The Debugging Process


    Step 1: Duplicate the bug

    The most critical step in the debugging process is the first one: duplicating the bug.

    My definition is duplicating the bug on a single machine once in a 24-hour period.

    Once you've duplicated the bug by using one general set of steps, you should evaluate whether you can duplicate the bug through a different set of steps.You can get to some bugs via one code path only, but you can get to other bugs through multiple paths. The idea is to try to see the behavior from all possible angles. By duplicating the bug from multiple paths, you have a much better sense of the data and boundary conditions that are causing the problems.

    Even if you can't duplicate the bug, you should still log it into your bug tracking system. If I have a bug that I can't duplicate, I always log it into the system anyway, but I leave a note that says I couldn't duplicate it.

    Step 2: Describe the bug

    In the real world, your writing skills are almost more important than your engineering skills because you need to be able to describe your bugs, both verbally and in writing. When faced with a tough bug, you should always stop right after you duplicate it and describe it.

    Step 3: Always assume that the bug is yours

    Reading the code will force you to take the extra time to look at the problem. Starting with the state of the machine at the time of the crash or problem, work through the various scenarios that could cause you to get to that section of code.

    Step 4: Divide and conquer

    Step 5: Think creatively

    If the bug you're trying to eliminate is one of those nasty ones that happens only on certain machines or is hard to duplicate, start looking at the bug from different perspectives. This is the step in which you should start thinking about version mismatches, operating system differences, problems with your program's binaries or its installation, and other external factors.

    Step 6: Leverage tools

    Step 7: Start heavy debugging

    Just as when you're doing light debugging, when you're doing heavy debugging, you should have an idea of where you think your bug is before you start using the debugger, and then use the debugger to prove or disprove your hypothesis.

    Step 8: Verify that the bug is fixed

    When testing your fix, especially in critical code, you should verify that it works with all data conditions, good and bad. Nothing is worse than a fix for one bug that causes two other bugs.

    Step 9: Learn and share

    Each time you fix a "good" bug (that is, one that was challenging to find and fix), you should take the time to quickly summarize what you learned.You learn the most about development when you're debugging, so you should take every opportunity to learn from it.

    Final Debugging Process Secret

    Again, I'm suggesting that you need to have a hypothesis in mind—something you want to prove or disprove—before the debugger can help you.As I recommended earlier in Step 7 I write out my hypothesis before I ever touch the debugger to ensure that I have a purpose each time I use it.