Support Code debug in Devcontainer (#10095)

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
quicksilver 2021-10-18 20:06:41 +08:00 committed by GitHub
parent 6601c24314
commit 86f711dd26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -205,12 +205,6 @@ Modify vscode go setups if necessary, the setting path is **code -> preference -
![image](../docs/imgs/settings.png)
Enable Code debug by remote debugging with dlv, you can enable debugging by run the following command inside your docker:
```shell
cp /go/bin/dlv /go/bin/dlv-dap
```
### Integrate goland with docker
TBD

View File

@ -58,6 +58,8 @@ RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.15.2.linux-am
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN ln -s /go/bin/dlv /go/bin/dlv-dap
RUN echo 'root:root' | chpasswd
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild

View File

@ -35,6 +35,8 @@ RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.15.2.linux-am
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN ln -s /go/bin/dlv /go/bin/dlv-dap
RUN apt-get update && apt-get install -y --no-install-recommends \
gdb gdbserver && \
apt-get remove --purge -y && \