Handmade Hero » Forums » Code » 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
3 posts
#20868 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'"
5 months, 2 weeks ago Edited by Mandelmus on April 7, 2019, 6:06 p.m.

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!
mmozeiko
Mārtiņš Možeiko
1971 posts / 1 project
#20869 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'"
5 months, 2 weeks ago Edited by Mārtiņš Možeiko on April 7, 2019, 11:03 p.m.

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?
Delix
Ryan Fleury
172 posts / 1 project

Handmade Network lead and developer of The Melodist

#20870 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'"
5 months, 2 weeks ago

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.

Handmade Network lead and developer of The Melodist
Mandelmus
3 posts
#20871 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'"
5 months, 2 weeks ago Edited by Mandelmus on April 8, 2019, 6:47 a.m.

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.
Mandelmus
3 posts
#20872 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'"
5 months, 2 weeks ago Edited by Mandelmus on April 8, 2019, 6:51 a.m.

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.