Loading...
Loading...
Systematic evidence-based debugging using runtime logs. Generates hypotheses, instruments code with NDJSON logs, guides reproduction, analyzes log evidence, and iterates until root cause is proven with cited log lines. Use when the user reports a bug, unexpected behavior, or asks to debug an issue.
npx skill4agent add millionco/expect debug-agentnpx debug-agent 2>&1 &&nohupblock_until_ms: 0{
"sessionId": "a1b2c3",
"port": 54321,
"endpoint": "http://127.0.0.1:54321/ingest/a1b2c3",
"logPath": "/tmp/debug-agent/debug-a1b2c3.log"
}endpointlogPathsessionId{
"sessionId": "a1b2c3",
"id": "log_1733456789_abc",
"timestamp": 1733456789000,
"location": "test.js:42",
"message": "User score",
"data": { "userId": 5, "score": 85 },
"runId": "run1",
"hypothesisId": "A"
}ENDPOINTSESSION_IDfetch('ENDPOINT',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({sessionId:'SESSION_ID',location:'file.js:LINE',message:'desc',data:{k:v},timestamp:Date.now()})}).catch(()=>{});hypothesisId{sessionId, runId, hypothesisId, location, message, data, timestamp}// #region debug log// #endregionrunId="post-fix"setTimeoutsleep| Method | Effect |
|---|---|
| Append JSON body as NDJSON line to log file |
| Read full log file contents |
| Clear the log file |