mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
Support Code debug in Devcontainer (#10095)
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
parent
6601c24314
commit
86f711dd26
@ -205,12 +205,6 @@ Modify vscode go setups if necessary, the setting path is **code -> preference -
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
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
|
### Integrate goland with docker
|
||||||
TBD
|
TBD
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,8 @@ RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.15.2.linux-am
|
|||||||
go clean --modcache && \
|
go clean --modcache && \
|
||||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
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
|
RUN echo 'root:root' | chpasswd
|
||||||
|
|
||||||
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
|
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
|
||||||
|
|||||||
@ -35,6 +35,8 @@ RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.15.2.linux-am
|
|||||||
go clean --modcache && \
|
go clean --modcache && \
|
||||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
gdb gdbserver && \
|
gdb gdbserver && \
|
||||||
apt-get remove --purge -y && \
|
apt-get remove --purge -y && \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user