Running game from Visual Studio

I was wondering if there is a way to run the game directly from Visual Studio? I can only compile and rebuild the code

I understand. I thought that the game could be opened from editor, thanks

Maybe your starup project is wrong. In the Solution Explorer, there will be two projects: The upper one is the UE4 project, the other one is your game. Right click your game project and set it as the startup project. Then hit F5 which should compile and start the debugger. The debugger will open the editor like normally, only that the debugger is attached to it, so if it crashes the debugger will catch the exceptions. You will still have to start your game from the editor though, visual studio can only open the editor, not the game directly.

You can run your game directly via Visual Studio, you just need to use a non-editor build configuration (and to have cooked your game content).

You can also pass -game when starting to editor to run the editor in game-mode (which makes the editor pretend that it’s the game and can avoid the need to cook).

the non-development configuration worked, along with setting the project as the start one. Thank you