How do I debug dedicated server blueprints?

Hello,

I’ve got a dedicated server building and running for my project, and I figured out how to debug C++ code of a running dedicated server. The way I did this is by building the server and then in the Visual Studio project I set the debug configuration to launch that server .exe and I can then hit breakpoints in the code.

But I also have a game mode blueprint that pretty much runs most of the server functionality and I want to debug that too, I want to be able to hit breakpoints there while debugging the server. How can I do that?

I have figured out a half-solution, which is to play as Listen server in the Unreal editor, which is nice because I can then make a special UI interface for just when running as a server, that might allow for player management and such. But the issue is that it also is a client, not just a server, and while I can hit breakpoints in the blueprints doing it that way, the client being there is getting in the way of my debugging. I need a way to run only a listen server from the editor, or just a way to debug a running dedicated servers blueprints.

Please tell me there is a way to do this :slight_smile:

After doing a little more research, I’m left with more questions, I understand that playing as a Listen Server in Unreal runs both a server and a client, but are they separate or the same program? Can they be separated? Is it possible to only run a listen server without a client in the editor?

I’ve figured out a way to work around this. In my world settings I set default pawn to none, and in the game mode, on PostLogin event I check if my player is the local player (running as a Listen Server in the editor) and if it is, I don’t spawn a pawn for that player, otherwise a pawn is spawned for remote players that connect. This way I can behave only as a server, despite there being a client as well

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.