bofa1ex / dlvx Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Thanks for the plugins!
I managed to breakpoint using Goland based on your plugin and documentation.
I triggered the RpcTest call from the admin local website, however my breakpoint is a bit weird, when the program hit a breakpoint, the Goland breakpoint line doesnt turn to blue like it always does. and the code line from the breakpoint data does not match my actual code file’s line (function call is at line 16 but the breakpoint data shows it is main.go:17)
here is my docker compose’s entrypoint config
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama &&
/nakama/dlv --log --log-output=debugger --listen=:4000 --headless=true --accept-multiclient --api-version=2 exec nakama -- --config /nakama/data/local.yml --database.address postgres:localdb@postgres:5432/nakama
here is my docker file
FROM heroiclabs/nakama-pluginbuilder:3.21.1 AS go-builder
ENV GO111MODULE on
ENV CGO_ENABLED 1
WORKDIR /backend
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends gcc libc6-dev
RUN go install github.com/go-delve/delve/cmd/dlv@latest
COPY go.mod .
COPY src/*.go .
COPY vendor/ vendor/
RUN go build --trimpath --gcflags "all=-N -l" --mod=vendor --buildmode=plugin -o ./backend.so
FROM registry.heroiclabs.com/heroiclabs/nakama-dsym:3.21.1
COPY --from=go-builder /go/bin/dlv /nakama
COPY --from=go-builder /backend/backend.so /nakama/data/modules/
COPY local.yml /nakama/data/
can you tell what i did wrongly ? thank you for your time i would really appreciate if you could help me take a look
as title stated, in order to deploy the server on to other cloud platform, i have split up my core (server logic) and database into 2 different container instead of using compose to group them together.
and when doing that, the debugger seems failed to connect with the following error message.
2024-04-13T15:47:39Z error layer=rpc writing response:write tcp 172.17.0.3:4000->172.17.0.1:56738: use of closed network connection
my docker file
FROM heroiclabs/nakama-pluginbuilder:3.21.1 AS go-builder
ENV GO111MODULE on
ENV CGO_ENABLED 1
WORKDIR /backend
COPY go.mod ./
COPY src/*.go ./
COPY vendor/ vendor/
RUN go build --trimpath --mod=vendor --buildmode=plugin -o ./backend.so
FROM registry.heroiclabs.com/heroiclabs/nakama:3.21.1
COPY --from=go-builder /backend/backend.so /nakama/data/modules/
COPY local.yml /nakama/data/
EXPOSE 7349
EXPOSE 7350
EXPOSE 7351
EXPOSE 2345
EXPOSE 8080
ENTRYPOINT ["/bin/sh", "-ecx", "/nakama/nakama migrate up --database.address postgres:[email protected]:5432/nakama && exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:[email protected]:5432/nakama"]
the database part should be fine because i have a Docker_release file which build my server without dlv and it can connect to database and i can enter the admin portal as usual.
Can you tell what went wrong with the debugging ?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.