{"record":{"id":"9dd741aa36183241","repo":"go-delve/delve","slug":"could-not-suspend-thread-d-s","errorCode":null,"errorMessage":"could not suspend thread %d %s","messagePattern":"could not suspend thread (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/native/threads_darwin.go","lineNumber":46,"sourceCode":"}\n\n// ErrContinueThread is the error returned when a thread could not\n// be continued.\nvar ErrContinueThread = fmt.Errorf(\"could not continue thread\")\n\nfunc (t *nativeThread) stop() (err error) {\n\tkret := C.thread_suspend(t.os.threadAct)\n\tif kret != C.KERN_SUCCESS {\n\t\terrStr := C.GoString(C.mach_error_string(C.mach_error_t(kret)))\n\t\t// check that the thread still exists before complaining\n\t\terr2 := t.dbp.updateThreadList()\n\t\tif err2 != nil {\n\t\t\terr = fmt.Errorf(\"could not suspend thread %d %s (additionally could not update thread list: %v)\", t.ID, errStr, err2)\n\t\t\treturn\n\t\t}\n\n\t\tif _, ok := t.dbp.threads[t.ID]; ok {\n\t\t\terr = fmt.Errorf(\"could not suspend thread %d %s\", t.ID, errStr)\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\nfunc (procgrp *processGroup) singleStep(t *nativeThread) error {\n\tkret := C.single_step(t.os.threadAct)\n\tif kret != C.KERN_SUCCESS {\n\t\treturn fmt.Errorf(\"could not single step\")\n\t}\n\tfor {\n\t\ttwthread, err := t.dbp.trapWait(t.dbp.pid)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif twthread.ID == t.ID {\n\t\t\tbreak","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/native/threads_darwin.go#L28-L64","documentation":"Error \"could not suspend thread %d %s\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/proc/native/threads_darwin.go:46 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"}