With some minor modifications to the directions in Debugging with Delve guide, and then debug your custom Go server runtime code using Delve inside a Docker container via Goland.
Diff than Heroic Labs Documentation | Using VSCode Debugger
There did not recommand to define extra-properties file.
It only required install the
dlvx plugin on jetbrain plugin marketplace.
With the above changes in place, go to the Edit Configurations… view in Goland by clicking the button shown below.
And Click + toggle the treelist of configuration type, it shows
Dlvx Go Remote to choose after
dlvx plugin install successful.
Dlvx Go Remotewas different from the official
Go Remotein internal implementation
Typing the local-nakama-server dlv listening port
Now launch the debugger by clicking the play button at the top of the Run and Debug panel.
Now let’s say we want to debug a call to an RPC. In the following example, we have registered an RPC inside the
InitModule function. The function name of the RPC is
GoFunction breakpoint on
We now need to trigger the RPC. We can do this either by calling it from a client or by visiting the Nakama Console in a browser and using the API explorer. Once the RPC has been triggered, you should see that Goland successfully hits the breakpoint and you can now use the standard debugging tools (e.g. Variables, Locals, Step Into, Step Over etc) as you would expect.