I according to the Using VSCode Debugger - Heroic Labs Documentation
I configured the debugging method of vscode, but still couldn’t break the point successfully. Could someone update the configuration method of launch.json?
The content of my go.mod is as follows:
module military-zone
go 1.24.3
require GitHub - heroiclabs/nakama-common: The runtime framework for Nakama server. v1.37.0
require (
GitHub - google/go-cmp: Package for comparing Go values in tests v0.5.9 // indirect
protobuf module - google.golang.org/protobuf - Go Packages v1.36.6 // indirect
)
dockerfile:
FROM heroiclabs/nakama-pluginbuilder:3.27.1 AS 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 . .
RUN go build --trimpath --gcflags “all=-N -l” --mod=vendor --buildmode=plugin -o ./backend.so
FROM heroiclabs/nakama-dsym:3.27.1
COPY --from=builder /go/bin/dlv /nakama
COPY --from=builder /backend/backend.so /nakama/data/modules/
COPY local.yml /nakama/data/