Gerrit Bot has uploaded this change for review.
docs/debugging.md: fix typo in gcflags
Fixed typo in definition of gcflags which without fix results in non-runnable command.
Change-Id: Idbcfa643274f102463a7b82f167baa8bcf2ab450
GitHub-Last-Rev: bcae709d7691aac7cbc48c0a33cc03a26ac7e539
GitHub-Pull-Request: golang/vscode-go#2033
---
M docs/debugging.md
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/docs/debugging.md b/docs/debugging.md
index dc7ba45..af2ae9b 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -87,7 +87,7 @@
* `debug`: build and debug a main package
* `test`: build and debug a test
* `exec`: debug a precompiled binary
- * The binary must be built with `go build -gcflags=all="-N -l"` to disable inlining and optimizations that can interfere with debugging.
+ * The binary must be built with `go build -gcflags="all=-N -l"` to disable inlining and optimizations that can interfere with debugging.
* `auto`: automatically choose between `debug` and `test` depending on the open file
⚠️ If a `port` attribute is added to any of the launch configurations, it will signal VS Code that instead of launching the debug server internally, it should connect to an external user-specified `dlv dap` server at `host:port` and launch the target there. See ["Remote Debugging"](#remote-debugging) for more details).
To view, visit change 381296. To unsubscribe, or for help writing mail filters, visit settings.
Congratulations on opening your first change. Thank you for your contribution!
Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.
Patch set 1:Run-TryBot +1
1 comment:
File docs/debugging.md:
Patch Set #1, Line 90: * The binary must be built with `go build -gcflags="all=-N -l"` to disable inlining and optimizations that can interfere with debugging.
Thanks for the CL.
My understanding is that they are effectively same if they run in the shell. Can you tell us more on in what environment you caught the issue?
The original command was from the Go's official documentation about debugging (https://go.dev/doc/gdb)
If you find that you need to disable these optimizations, build your program using go build -gcflags=all="-N -l".
To view, visit change 381296. To unsubscribe, or for help writing mail filters, visit settings.
Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/c758ebb7-ed92-4a93-9a53-0622e8d11abd
Patch set 1:TryBot-Result +1
Patch set 1:Code-Review -2
1 comment:
File docs/debugging.md:
Patch Set #1, Line 90: * The binary must be built with `go build -gcflags="all=-N -l"` to disable inlining and optimizations that can interfere with debugging.
Thanks for the CL. […]
-gcflags=all="-N -l"
-gcflags="all=-N -l"
"-gcflags=all=-N -l"
all are correct - depending on how shell script interprets. Let's stick with the Go's official documentation.
To view, visit change 381296. To unsubscribe, or for help writing mail filters, visit settings.
Hyang-Ah Hana Kim abandoned this change.
To view, visit change 381296. To unsubscribe, or for help writing mail filters, visit settings.