diff --git a/cmd/dlv/main.go b/cmd/dlv/main.go index 0877cbaf6cb20443ceae3f2b793a2fdcb6031192..945ce92cdbeed433ce7cf7108eb2edf125fdc99d 100644 --- a/cmd/dlv/main.go +++ b/cmd/dlv/main.go @@ -256,6 +256,10 @@ starts and attaches to it, and enable you to immediately begin debugging your pr return 1 } debugname := "./" + base + ".test" + // On Windows, "go test" generates an executable with the ".exe" extension + if runtime.GOOS == "windows" { + debugname += ".exe" + } defer os.Remove(debugname) processArgs := append([]string{debugname}, args...)