Skip to content

Source level debugging using VS2013 Express

Bo3b Johnson edited this page Mar 17, 2014 · 3 revisions

For anybody working on 3Dmigoto, you would probably like to be able to do source-level debugging of the code. At a minimum, source-level debugging gives you the ability to understand how the code works and should allow for easier fixing of crashing bugs.

To do source-level debugging do this:

  1. Make sure your target game is installed and all ready.
  2. Do a clean Debug build of 3Dmigoto.
  3. Drop all of the debug files into your target game's executable folder.
  4. Launch the target game.
  5. Make sure that 3Dmigoto is running and working properly, by trying to find shaders for example.
  6. Alt-tab out to get back to VS.
  7. Debug menu->Attach to Process in VS. Choose the game executable.
  8. Set breakpoints in 3Dmigoto.

Note that Just in Time debugging does not work in Express versions of Visual Studio, so if you get an unhandled crash, it can't be started after the crash.

New feature: Added a wait loop upon initialization that will optionally wait for you to Attach from Visual Studio. Add the hidden tag of waitfordebugger=1 into the Logging section of d3dx.ini. It's hidden because it will cause game hangs for the unwary, and only useful to those using Visual Studio.