]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document that 'go run' strips debug info
authorIan Lance Taylor <iant@golang.org>
Mon, 14 Mar 2022 17:29:51 +0000 (10:29 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 15 Mar 2022 17:29:54 +0000 (17:29 +0000)
Change-Id: Ie7293a33862853ac56ee0a9017b201d8ff0ba1f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/392574
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/run/run.go

index 825de1e64a86f0fef0a1813ee64b10a924125d8c..8410731a28ae2827578925c05e4adf8ce9dda60b 100644 (file)
 // cross-compiled programs when a simulator or other execution method is
 // available.
 //
+// By default, 'go run' compiles the binary without generating the information
+// used by debuggers, to reduce build time. To include debugger information in
+// the binary, use 'go build'.
+//
 // The exit status of Run is not the exit status of the compiled binary.
 //
 // For more about build flags, see 'go help build'.
index 312b49ef5dfa33828cf65c9ac373dfad88d86e8f..35c57833730c7e3131299b1e0c2159fc8eab197e 100644 (file)
@@ -52,6 +52,10 @@ for example 'go_js_wasm_exec a.out arguments...'. This allows execution of
 cross-compiled programs when a simulator or other execution method is
 available.
 
+By default, 'go run' compiles the binary without generating the information
+used by debuggers, to reduce build time. To include debugger information in
+the binary, use 'go build'.
+
 The exit status of Run is not the exit status of the compiled binary.
 
 For more about build flags, see 'go help build'.