Debugging
Track down bugs using the code knowledge graph
Use the knowledge graph to trace bugs, find root causes, and understand error propagation.
Debugging Workflows
Error Message
"Find code related to UserNotFoundError"
"What functions throw or catch UserNotFoundError?"
"Trace callers of the function that throws this error"
Uses: Context Search to find error code, Cypher Query to trace callers
Unexpected Behavior
"Where is calculateTotal defined?"
"What does calculateTotal call?"
"What functions call calculateTotal?"
Uses: Cypher Query for relationship traversal
Data Flow Issues
"Trace the data flow from handleRequest to the database"
"Find all functions that handle userId"
Uses: Context Search and Cypher Query for path tracing
Using Processes
"Show me the codebase map"
"Trace the checkout process"
"What processes involve the payment module?"
Uses: Codebase Map and Process Trace resources
Bugs often occur at community boundaries - look at cross-community flows.
Depth for Debugging
Use the depth parameter on search tools to control detail level:
| Depth | When to Use |
|---|---|
"definitions" (default) | Quick lookup - find where something is defined |
"full" | Deep debugging - see callers, callees, and relationships |
"Search for authentication handlers with full relationship data"
Using depth: "full" reveals how code connects - critical for tracing bug propagation.
Common Questions
| Question | Tool/Resource |
|---|---|
| "Find error-related code" | Context Search |
| "What calls this?" | Cypher Query |
| "What does this call?" | Cypher Query |
| "Trace this process" | Process Trace |
| "Cross-community flows" | Codebase Map |
| "Impact of changes" | Impact Detection |