go-delve/delve · warning
follow exec not implemented
Error message
follow exec not implemented
What it means
FollowExec mode (automatically attaching to child processes after exec) is not implemented on this platform's native backend. The stub returns this error unconditionally, so the feature simply cannot be enabled here.
Source
Thrown at pkg/proc/native/followexec_other.go:9
//go:build !linux && !windows
package native
import "errors"
// FollowExec enables (or disables) follow exec mode
func (*nativeProcess) FollowExec(bool) error {
return errors.New("follow exec not implemented")
}
func (*processGroup) detachChild(*nativeProcess) error {
panic("not implemented")
}
View on GitHub (pinned to a23773e6c3)
Solutions
- Do not call FollowExec on this platform; check platform support first
- Use dlv's exec-based workflow manually: let the child run separately and attach with dlv attach <pid>
- If Linux support is needed, run the debugger with the native Linux backend where follow exec is implemented
- File/check an upstream issue if you need follow-exec on your OS
Example fix
// before
dbg.FollowExec(true)
// after
if runtime.GOOS == "linux" {
dbg.FollowExec(true)
} else {
log.Println("follow exec not supported on", runtime.GOOS)
} Defensive patterns
Strategy: fallback
Validate before calling
// gate follow-exec on platform support before calling
var followExecSupported = runtime.GOOS == "linux"
if !followExecSupported {
return errors.New("follow exec is only supported on linux")
} Try / catch
if err := dbg.FollowExec(true); err != nil {
if strings.Contains(err.Error(), "follow exec not implemented") {
log.Println("follow-exec unavailable; falling back to manual attach")
} else {
return err
}
} Prevention
- Check delve's platform support matrix before enabling follow-exec-mode
- On non-Linux OSes, attach to children manually with dlv attach <pid>
- Expose follow-exec only behind a supported-platform flag in tooling built on delve
- Watch upstream issues for follow-exec ports to other platforms
When it happens
Trigger: Calling (*nativeProcess).FollowExec(true or false) on any platform compiled with followexec_other.go (i.e., not linux with the follow-exec implementation), e.g. via debugger.FollowExec on macOS or FreeBSD.
Common situations: User enables follow-exec-mode in the Delve config on a non-Linux OS; CLI/API user toggles follow exec while debugging on macOS/Windows/FreeBSD native backend.
Related errors
- follow exec not supported
- hardware breakpoints not supported
- native backend disabled during compilation
- short read
- could not fork/exec
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/c2321f8f2dccebfc.
Report an issue: GitHub.