# debugging

**UNDERSTAND THE SYSTEM**

* read the manual
* read everything in depths
* know the fundamentals
* know the road map
* understand your tools
* look up the details

**MAKE IT FAIL**

* do it again
* start at the beginning
* stimulate the failure
* but don't stimulate the failure
* find the uncontrolled condition that makes it intermittent
* record everything and find the signature of intermittent bugs
* don't trust statistics too much
* know that "that" can happen
* never throw away a debugging tool

**QUIT THINKING AND LOOK**

* see the failure
* see the details
* build instrumentation in
* add instrumentation on
* don't be afraid to dive in
* watch out for heisenburg
* guess only to focus the search

**DIVIDE AND CONQUER**

* narrow the search with successive approximation
* get the range
* determine which side of the bug you are on
* use easy-to-spot test patterns
* start with the bad
* fix the bugs you know about
* fix the noise first

**CHANGE ONE THING AT A TIME**

* isolate the key factor
* grab the brass bar with both hands
* change one test at a time
* compare it with a good one
* determine what you changed since the last time it worked

**KEEP AN AUDIT TRAIL**

* write down what you did, in what order, and what happened as a result
* understand any detail could be the important one
* correlate events
* understand audit trails for design are also good for testing
* write it down

**CHECK THE PLUG**

* question your assumptions
* start at the beginning
* test the tool

**GET A FRESH VIEW**

* ask for fresh insights
* tap expertise
* listen to the voice of experience
* know that help is all around you
* don't be proud
* report symptoms, not theories
* realize that you don't have to be sure

**IF YOU DIDN'T FIX IT, IT AIN'T FIXED**

* check that it's really fixed
* check that it's really your fix that fixed it
* know that it never just goes away by itself
* fix the cause
* fix the process


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://um.fz.ax/dev/debugging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
