Handmade Hero»Forums»Code
3 posts
Day 001: Trying to debug my first .EXE in Visual Studio gives me an error "There is no editor available for 'W:\build\win32_handmade.exe'"
Edited by Mandelmus on
Hey everyone. I just started the journey of trying to follow along with Casey's series and I'm stumbling across this roadblock at the Debug with Visual Studio step.

After building the file with the build.bat I enter devenv \build\win32_handmade.exe to the command line (after having added VS to my PATH, which it initially wasn't in) but VS starts up only to tell me:



Any idea what's wrong here and what I need to do? I'm using Visual Studio 2019 Community Edition.

Thanks in advance for any advice!
Mārtiņš Možeiko
2562 posts / 2 projects
Day 001: Trying to debug my first .EXE in Visual Studio gives me an error "There is no editor available for 'W:\build\win32_handmade.exe'"
Edited by Mārtiņš Možeiko on
Does "W:\build\win32_handmade.exe" file actually exists?

Is this final VS2019 version? If you had preview versions installed before it may messed up something.
Can you debug C++ applications from solution created in VS?
Ryan Fleury
204 posts / 4 projects
Working at Epic Games Tools (RAD). Former Handmade Network lead. Maker of Hidden Grove.
Day 001: Trying to debug my first .EXE in Visual Studio gives me an error "There is no editor available for 'W:\build\win32_handmade.exe'"
Mandelmus
After building the file with the build.bat I enter devenv \build\win32_handmade.exe to the command line (after having added VS to my PATH, which it initially wasn't in) but VS starts up only to tell me...


If a path you specify has a \ at the beginning of it, that signifies that the path starts in the drive's root directory. So, it's looking for W:\build\win32_handmade.exe, instead of what you probably meant, which is something like W:\handmade\build\win32_handmade.exe. You should just do devenv build\win32_handmade.exe from the handmade directory, and then it should work.
3 posts
Day 001: Trying to debug my first .EXE in Visual Studio gives me an error "There is no editor available for 'W:\build\win32_handmade.exe'"
Edited by Mandelmus on
Delix
You should just do devenv build\win32_handmade.exe from the handmade directory, and then it should work.


No that's correct. I don't have a w:\handmade\ folder, my build folder is right there in w: and the win32_handmade.exe exists at the specified location. I can execute it with that path and it behaves as expected, opening up the MessageBox() popup.
3 posts
Day 001: Trying to debug my first .EXE in Visual Studio gives me an error "There is no editor available for 'W:\build\win32_handmade.exe'"
Edited by Mandelmus on
mmozeiko
Does "W:\build\win32_handmade.exe" file actually exists?

Is this final VS2019 version? If you had preview versions installed before it may messed up something.
Can you debug C++ applications from solution created in VS?

I had no preview versions installed, it's the 2019 final release version.

The file does exist and I can run it, which opens up the intended MessageBox() popup.

And it appears that I can debug C++ application created directly in VS - at least if this is what it's supposed to look like to create a C++ project in VS and hit F11.

EDIT: Turns out I can now run devenv \build\win32_handmade.exe successfully! Upon creating a C++ project, Visual Studio prompted me to install some additional workload for C++, and now it works. I thought I'd had installed the necessary C++ tools but apparently not.

Thank you for this hint! :) Consider this thread resolved.