2

While trying to debug minidumps of our application taken during crashes on customer PCs, I find that the path where they install the application seem to have an effect on where my executable should be installed for debugging.

For example, if user installed in some location "N:\AppFolder", I'm forced to create a drive with letter "N" and "AppFolder" and install my application before debugging the application. Other wise I get a error saying module cannot be found. Is there a way to select arbitrary location of executable or module while debugging crash dumps ?

Environment: Visual studio 2010, Windows 7 crashdumps are of type minidump.

ivymike
  • 1,511
  • 2
  • 20
  • 27
  • 1
    It does matter. I never chased down an alternative, just easier to create the directory and copy the EXE and PDB files there. You can use the SUBST command to create an N: drive. – Hans Passant Aug 13 '13 at 18:08
  • Does using stack walking api (StackWalk()) lets us set this path programmatically for generating a stack trace? – ivymike Aug 13 '13 at 18:15

2 Answers2

3

As described by Microsoft, open the immediate window and type .exepath to change it.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
  • Once we set the path is there a way to refresh the debugging session with the new path. It seems to set it only when the debugging has already started (other wise throws a can't execute command when in design mode error). But by this point IDE has already shown the binary not found error and there doesn't seem to be a way to force it to take the new path. – ivymike Jan 13 '14 at 09:53
  • Can you try `.reload`? http://msdn.microsoft.com/en-us/library/windows/hardware/ff564805%28v=vs.85%29.aspx – Thomas Weller Jan 13 '14 at 10:15
  • 1
    Aah looks like .exepath is not supported in c++ IDE :(. According to: "http://stackoverflow.com/questions/15648455/vs-immediate-window-for-c-declarations. I get the error "CXX0013: Error: missing operator" always. – ivymike Jan 13 '14 at 13:38
1

I use the Windows Error Reporting system to receive .cab files containing crash dump files. I use Visual Studio to process the dump files and I do not have to recreate the user environment to process the dump file. My only requirement is to copy the dump file to my locally installed copy of the software that the user has installed. I do not need to use the same naming conventions the user has specified. I then make sure my symbol files are pointing to the appropriate cache and start debugging. This methodology works for Visual Studio or WinDbg.

rrirower
  • 4,338
  • 4
  • 27
  • 45