visual studio – How do I attach a debugger to a compiled .exe file/running process?


I am a new CS student looking to learn more about how computers work. I have some programming experience, but haven’t really used a debugger in the context of coding (I have used them for ROM hacking NES games).

There is a mod for the game “Avatar: Frontiers of Pandora” that enables disk caching. In the comments, someone asked “Any reason why it’s CreateFileW instead of CreateFileA?” and the author responded “Because that is what AOFP uses to access files. Just attach some debugger or anything that can track stack frame. That will explains all.” I would like to learn how to do exactly that.

I read a tutorial on how to attach Visual Studio’s debugger to a running process, but I am not seeing anything remotely resembling “CreateFileW” or any other functions in the view that VS provides, and after hours of poking around the interface and searching Google, I am still no closer to understanding what I need to do or what to search for. Can someone point me in the right direction?

I tried attaching Visual Studio 2022’s debugger to the process and reading the output. Unfortunately, I’m not seeing anything relevant to “CreateFileW”. I would imagine there should be some way to view the code, but I am not very familiar with VS’s interface and there are hundreds of menus to go through.

Leave a Reply

Your email address will not be published. Required fields are marked *