Hello,
I want to remotely debug a game server with visual studio.
Before trying to remotely debugging a game server deployed in Azure, is it possible to locally debugging a game server running in a container?
(I know that I can already debug a game server running in process mode.)
My assumption is that it is possible and the steps are the same than a game server deployed in Azure.
So I tried to follow this documentation:
And there are some points that I don’t understand.
1/ Include the VS2017 Remote Debugging tools in my game server asset package:
Should I include the downloaded file rtools_setup_x64.exe directly or should I first install the tools and copy all directories and files into my asset package?
2/ As part of creating your server build in Game Manager or with the Entity API, configure port 4022 TCP as a debug port.
In MultiplayerSettings.json, I added the debug port but I don’t know what should be the NodePort?
"PortMappingsList": [ [ { "NodePort": 56100, "GamePort": { "Name": "game_port", "Number": 3600, "Protocol": "UDP" } }, { "NodePort": ??????, "GamePort": { "Name": "debug_port", "Number": 4022, "Protocol": "TCP" } } ] ]
3/ You will need to run msvsmon within the container, to enable remote debugging.
In MultiplayerSettings.json, in StartGameCommand flag, I listed 3 commands (separated by ‘;’):
1/ msvsmon.exe /prepcomputer /quiet
2/ msvsmon.exe /nostatus /noauth /nosecuritywarn /anyuser /nofirewallwarn /nodiscovery /port 4022
3/ MyGameServer.exe
"ContainerStartParameters": { "StartGameCommand": "C:\\Assets\\RemoteDebugger\\Common7\\IDE\\Remote Debugger\\x64\\msvsmon.exe /prepcomputer /quiet;C:\\Assets\\RemoteDebugger\\Common7\\IDE\\Remote Debugger\\x64\\msvsmon.exe /nostatus /noauth /nosecuritywarn /anyuser /nofirewallwarn /nodiscovery /port 4022;C:\\Assets\\MyGameServer.exe",
Is that correct?
4/ Attempt to debug via VS, using the external debug port returned from the allocate call.
How can I achieved this step?
In Visual, in Debug -> Attach to Process
What should I choose in Connection type?
- Default
- Remote (no authentication)
- Docker (Windows Container)
What should I set in Connection target?
Thanks for your help.