Having trouble viewing all files in Visual Studio

Hi Everyone,

I'm on Day 39, and now that we are loading images into the game, in order to see the images in the game, I'm having to build from Visual Studio. There are a few questions

I'm running into a problem where, when I try to debug, I can only view the win3_handmade.dll file, and I cannot figure out how to step into any other the other files.

I built the project by running
1
devenv /path/to/handmade.exe
, and saved the project with the working directory pointed to my Data folder. In my solution explorer I can only see the exe, no other files, and I can't see what Casey has in his to see if I'm doing it wrong.

As an attempt to fix it I tried to run
1
devenv path/to/win32_handmade.cpp
, but that wouldn't even let me run debug, so I have no idea what I'm doing wrong.

Any help would be deeply appreciated. I'd quite like to be able to debug.

Thanks,

Joe.

EDIT: Fixed stupid error.

Edited by Joseph Abell on
What do you mean by stepping into other files? You typically step into/over source lines in debugger from .cpp and .h files. Not the .dll or .exe file, unless you want to debug assembler instructions directly.

Does debugger shows error that it cannot find source files for current location? It tries automatically loads source for any file it has debugging info. Have you built executable with debugging info (/Zi or /Z7 argument to cl.exe)? cl.exe puts debugging info in *.pdb file next to executable. Do you have these files (for .exe and .dll file).

Edited by Mārtiņš Možeiko on
Ok, sorry, when I said I attempted to build a dll file, I meant cpp, sorry for the confusion.

My build.bat does have -Z7 in it, and I've managed to step into handmade.cpp from win32_handmade.cpp after debugging. Do I need to continue stepping into each of the files in order to see them in Visual Studio, or is there a way I can view all the files which have been called during the build?

I'm really sorry if I'm asking the wrong question, or putting it wrong. Sometimes you don't know what you don't know.
Yes, you need to keep stepping in if you want to see where execution goes. As far as I know debugger doesn't really offer functionality to list files. Typically when you build with Visual Studio project then you have list of files in your solution explorer. But for custom builds it doesn't list anything.

Why do you want to see all files? You can open files (File->Open->File..) and set breakpoints wherever you want and then run program and wait until it stops, if that is what you want.
Thank you so much, that was exactly what I was looking for, I have no idea why I thought it would be more difficult than just opening the files.

Thanks again, no wonder I couldn't find anything on the forums about this, it was so simple, no-one else needed to ask.

:)