I am currently using the 4.14.3 release of Unreal Engine from GitHub. My dedicated server is built, got a nice little executable that works just fine, but I would like to debug it (not attach to the process after the server is already loaded). Any suggestions on how to do this?
Do you have a pdb file along with your executable? The pdb file contains debugging symbols for the executable, and normally is named like the executable, with the .exe replaced by .pdb.
You can create any dummy visual studio project (or use an existant, the change we make here are not permanent).
Right click on the project, choose Properties, then Debugging. In the Command Field insert the path to your dedicated server app, Check the Command Arguments.
As long as the Visual Studio knows where to find the source code you should be able to set breakpoints and debug as usual.
Thank you for your response! With the information you provided, I was able to figure out why the server failed to run via Visual Studio.
While I was pointing the Command field at my executable, I had not corrected the command-line arguments. Every time I would attempt to run the debugger, it would crash! Oops!
So, for anyone looking to debug a dedicated server with Visual Studio 2015, here are the steps that I used:
Navigate to [ProjectName]/Binaries/Win64/ and copy the [ProjectName]Server .exe and .pdb files to [CookedContent]/WindowsNoEditor/[ProjectName]/Binaries/Win64/
In Visual Studio, right click your project and select [Set as StartUp Project]
Right-click your project and select Properties.
Configuration Properties > Debugging > Command: Point to [CookedContent]/WindowsNoEditor/[ProjectName]/Binaries/Win64/[ProjectName]Server.exe
Command Arguments: I just removed everything, so this is blank!