Visual Studio not able to debug

Hi Taimo__,

The error that you are seeing is because you are trying to run the UE4 project through the Visual Studio debugger instead of your game project. This won’t work when you are using the binary version of the Engine that is installed through the Launcher.

If you look at your Solution Explorer window in Visual Studio, you should see two folders named Engine and Games. The Engine folder contains the UE4 project, where you can browse through all of the source code for the Engine, but cannot make any changes. The Games folder contains your game project. In your case, the UE4 project is the default project (it should be displayed in bold characters in the Solution Explorer). If you right-click on your game project, you can select the “Set as Startup Project” option in order to make your game project the default project. Now, when you press F5, the Visual Studio debugger will run your game project instead of trying to run the UE4 project. Alternatively, you could just right-click on your game project and select the Debug → Start new instance option, which is what I typically do.

If you download the source code from GitHub and build the Engine yourself from that, you will be able to run the UE4 project itself through the Visual Studio debugger (in addition to being able to modify the source code however you wish as long as you are complying with the EULA). This normally will just show you the Project Browser window, so it is of limited usefulness. If you have built the Engine from source code, there will be a third folder in the Solution Explorer window containing the source code for a number of programs that are working “under the hood” in the Engine. It is also possible to have multiple game projects included in a single Visual Studio solution, depending on how you set it up.

8 Likes