go-delve/delve · error
lldb backend not supported on Windows
Error message
lldb backend not supported on Windows
What it means
ErrUnsupportedOS is a sentinel error returned by LLDBLaunch and LLDBAttach in the gdbserial backend when the host OS is Windows. The LLDB-based backend relies on lldb-server, which is not supported on Windows, so any attempt to use the lldb backend there fails immediately with this error.
Source
Thrown at pkg/proc/gdbserial/gdbserver.go:443
}
func canUnmaskSignals(debugServerExecutable string) bool {
checkCanUnmaskSignalsOnce.Do(func() {
buf, _ := exec.Command(debugServerExecutable, "--unmask-signals").CombinedOutput()
canUnmaskSignalsCached = !strings.Contains(string(buf), "unrecognized option")
})
return canUnmaskSignalsCached
}
// commandLogger is a wrapper around the exec.Command() function to log the arguments prior to
// starting the process
func commandLogger(binary string, arguments ...string) *exec.Cmd {
logflags.GdbWireLogger().Debugf("executing %s %v", binary, arguments)
return exec.Command(binary, arguments...)
}
// ErrUnsupportedOS is returned when trying to use the lldb backend on Windows.
var ErrUnsupportedOS = errors.New("lldb backend not supported on Windows")
func getLdEnvVars() []string {
var result []string
environ := os.Environ()
for i := range environ {
if strings.HasPrefix(environ[i], "LD_") ||
strings.HasPrefix(environ[i], "DYLD_") {
result = append(result, "-e", environ[i])
}
}
return result
}
// LLDBLaunch starts an instance of lldb-server and connects to it, asking
// it to launch the specified target program with the specified arguments
// (cmd) on the specified directory wd.View on GitHub (pinned to a23773e6c3)
Solutions
- Use the native backend instead: dlv debug/exec/attach --backend=native (the default on Windows).
- Remove explicit --backend=lldb from scripts/IDE launch configs on Windows.
- If you need LLDB specifically, run delve inside WSL or a Linux/macOS environment.
- Guard code with runtime.GOOS checks before choosing the backend.
Example fix
// before dlv exec ./app.exe --backend=lldb // after dlv exec ./app.exe --backend=native
Defensive patterns
Strategy: validation
Validate before calling
if runtime.GOOS == "windows" && backend == "lldb" {
return errors.New("lldb backend is unsupported on Windows; use native")
} Try / catch
if errors.Is(err, gdbserial.ErrUnsupportedOS) {
// fall back to native backend
} Prevention
- Use --backend=native on Windows (it is the default).
- Remove hardcoded --backend=lldb from cross-platform scripts and IDE configs.
- Gate backend choice on runtime.GOOS.
When it happens
Trigger: Calling gdbserial.LLDBLaunch or gdbserial.LLDBAttach on a Windows host (i.e. selecting the lldb backend, e.g. via 'dlv exec --backend=lldb' or debugging a binary compiled with cgo/lldb config).
Common situations: Windows users running 'dlv debug --backend=lldb', IDE configs defaulting to the lldb backend, or following documentation for macOS/Linux that does not apply on Windows.
Related errors
- unknown debug event code: %d
- backend does not support function calls
- could not connect
- eBPF is disabled
- VirtualQueryEx wrapped around the address space or stuck
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/dedb5957b7417015.
Report an issue: GitHub.