From 9b7bc638861e7f91f983a6adaa3d5d27ff17f226 Mon Sep 17 00:00:00 2001 From: chainhelen Date: Mon, 19 Oct 2020 23:21:03 +0800 Subject: [PATCH] Doc: update KnownBugs and faq. (#2196) 1. Remove bug about unsupport systems, because we has pretty error msg. 2. Add usage for remote debugging. Relate: #1883, #1829, #861, #1332. --- Documentation/KnownBugs.md | 1 - Documentation/faq.md | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Documentation/KnownBugs.md b/Documentation/KnownBugs.md index 9aa24cbb..3b0545db 100644 --- a/Documentation/KnownBugs.md +++ b/Documentation/KnownBugs.md @@ -1,6 +1,5 @@ # Known Bugs -- Delve does not currently support 32bit systems. This will usually manifest as a compiler error in `proc/disasm.go`. See [Issue #20](https://github.com/go-delve/delve/issues/20). - When Delve is compiled with versions of go prior to 1.7.0 it is not possible to set a breakpoint on a function in a remote package using the `Receiver.MethodName` syntax. See [Issue #528](https://github.com/go-delve/delve/issues/528). - When running Delve on binaries compiled with a version of go prior to 1.9.0 `locals` will print all local variables, including ones that are out of scope, the shadowed flag will be applied arbitrarily. If there are multiple variables defined with the same name in the current function `print` will not be able to select the correct one for the current line. - `reverse step` will not reverse step into functions called by deferred calls. diff --git a/Documentation/faq.md b/Documentation/faq.md index da2635af..6fd10eb3 100644 --- a/Documentation/faq.md +++ b/Documentation/faq.md @@ -53,3 +53,26 @@ the terminal TTY. 1. Assign the process its own TTY. This can be done on UNIX systems via the `--tty` flag for the `dlv debug` and `dlv exec` commands. For the best experience, you should create your own PTY and assign it as the TTY. This can be done via [ptyme](https://github.com/derekparker/ptyme). + +#### How can I use Delve for remote debugging? + +It is best not to use remote debugging on a public network. If you have to do this, we recommend using ssh tunnels or a vpn connection. + +##### ```Example ``` + +Remote server: +``` +dlv exec --headless --listen localhost:4040 /path/to/executable +``` + +Local client: +1. connect to the server and start a local port forward + +``` +ssh -NL 4040:localhost:4040 user@remote.ip +``` + +2. connect local port +``` +dlv connect :4040 +``` -- GitLab