{"record":{"id":"827799fd8a3066c5","repo":"go-delve/delve","slug":"could-not-find-thread-d","errorCode":null,"errorMessage":"could not find thread %d","messagePattern":"could not find thread (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/debugger/debugger.go","lineNumber":2210,"sourceCode":"func (d *Debugger) Recorded() (recorded bool, tracedir string) {\n\td.targetMutex.Lock()\n\tdefer d.targetMutex.Unlock()\n\treturn d.target.Recorded()\n}\n\n// FindThreadReturnValues returns the return values of the function that\n// the thread of the given 'id' just stepped out of.\nfunc (d *Debugger) FindThreadReturnValues(id int, cfg proc.LoadConfig) ([]*proc.Variable, error) {\n\td.targetMutex.Lock()\n\tdefer d.targetMutex.Unlock()\n\n\tif _, err := d.target.Valid(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tthread, found := d.target.Selected.FindThread(id)\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"could not find thread %d\", id)\n\t}\n\n\treturn thread.Common().ReturnValues(cfg), nil\n}\n\n// Checkpoint will set a checkpoint specified by the locspec.\nfunc (d *Debugger) Checkpoint(where string) (int, error) {\n\td.targetMutex.Lock()\n\tdefer d.targetMutex.Unlock()\n\treturn d.target.Checkpoint(where)\n}\n\n// Checkpoints will return a list of checkpoints.\nfunc (d *Debugger) Checkpoints() ([]proc.Checkpoint, error) {\n\td.targetMutex.Lock()\n\tdefer d.targetMutex.Unlock()\n\treturn d.target.Checkpoints()\n}","sourceCodeStart":2192,"sourceCodeEnd":2228,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/service/debugger/debugger.go#L2192-L2228","documentation":"Error \"could not find thread %d\" thrown in go-delve/delve.","triggerScenarios":"Thrown at service/debugger/debugger.go:2210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}