I cannot launch in Debug

I have not had any issue with this, except with projects I converted to 4.9.

On my converted projects I can build my C++ projects okay and the type appears in the editor. When I go to run in debug (Development mode), it says it fails to find the required Unused directory. I can navigate to this directory fine and my project is set up to use them, I checked and other working projects use this directory too.

It is worth noting I also opened up UE4 and tried to run all of the engine build batch files which all seem to fail. I thought it was a huge red flag, yet I can still build my projects and create new C++ stuff.

I am confident it is an issue with converting my project. Is there any idea what I need to change to have the build process correctly use this directory, so I can run debug?

1 Like

I tried using the following path way in my configuration properties because I saw my newly created 4.9 projects used it.

$(ProjectDir)…\Build\Unused\

Still had no success.

Hi Jakey113G,

I just wanted to confirm that you are only seeing this happening in projects that you have upgraded to 4.9, and newly-created 4.9 projects are not having any problems.

What version of the Engine are you upgrading from, and was it the binary version of the Engine installed through the Launcher, or did you build the Engine from source code?

Tim

Sorry about the delay I was just making a reproducible case.

I am only seeing this issue with projects I have converted up to 4.9, not newly created 4.9 projects. I upgraded from version 4.8 (though one of the projects was originally 4.7).

I am using the version installed through the Launcher.

Reproduction:

  • Created the third person C++ template project in 4.8

  • Open 4.9 from the launcher.

  • Browse to project and try to open.

  • Select the option to convert in place (advanced options).

  • Open the converted project.

  • Launch Visual studio 2013

  • Build (will succeed)

  • Attempt to launch Local Windows Debugger (Developer Editor setting)

Expected result: Successful launch
Actual Result: Error

59711-returned+error.png

I followed the steps that you outlined (very clear, thank you for that!), but did not see the same results. In my case, the Editor launched normally using the Local Windows Debugger. I might have an idea about what is happening for you, though. To make sure, could you tell me what your normal process is for launching the debugger? Also, if you look at your Solution Explorer window, check the UE4 solution in the Engine folder and your game solution in the Games folder and let me know which one of those solutions is currently bold (if one of them is).

Tim

Make sure the Game solution is set as the start up project. Right click the game solution and select “Set as StartUp Project” option.

Not sure why my game solution was not set as the start up project when I converted but that is likely an issue on my end.

Hmm I don’t know what could be wrong with my set up then. My game solution is the bold one.

EDIT***

Okay strangely enough changing the start up project to my engine and then swapping it back to the game solution fixed it.

Thank you again for the help.

I am not sure why Visual Studio was attempting to launch the UE4 solution in the debugger instead of your game project, when the game project was apparently set as the startup project. I generally work with the source code version of the Engine instead of the binary version, or I probably would have recognized this more quickly. Basically what was happening was that Visual Studio was trying to launch the binary Editor through the debugger, which it can’t do.

Also, in my case I generally right-click on the project I want to build/debug and select the appropriate option from the context menu. I went through the upgrade process again and noticed this time that neither the UE4 project nor the game project were selected as the startup project (and the F5 key did nothing when pressed). I’m going to go through this process a couple more times and report that, because I am fairly sure it isn’t supposed to lose the selected startup project when the project is upgraded.

Tim

I ran some more tests, and this isn’t something that is limited to just the binary version of the Engine, nor is it just when converting a project in place (this is not a process we recommend since it has the potential to irrevocably corrupt a project). I don’t believe this is intended functionality, so I went ahead and put in a report of my observations to have it investigated further (UE-21372). Thanks for pointing this out to us. I probably would not have noticed this change for some time due to my normal process when working with a code project in Visual Studio.

Tim