Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio debugger - source search directory

I have a crash dump (minidump, mdmp format) for an executable (native x86 code) compiled on a different computer. I have the pdb + exe corresponding to the crash dump, they are located next to the crashdump, and debugger recognizes them correctly. The pdb references sources on a path which is not available on my computers (say E:\Project). When I first opened the crash dump, the debugger has asked me for the source location. I pointed it to E:\B\Project on my computer, however once the source window appeared, I realized my choice was wrong (the sources were for a different product branch). I would like to point the debugger to a correct location E:\D\Project, however the debugger is no longer asking me. There is no solution, project or opt file for the crashdump created. I have searched the registry, but I did not find E:\B\Project anywhere.

How can one set/change source directories for Visual Studio debugger?

like image 452
Suma Avatar asked Nov 12 '13 08:11

Suma


People also ask

Where is source files in Visual Studio?

First, select DevTools > Settings > Experiments > Open source files in Visual Studio Code, and then re-start DevTools.

How do you hit debugger in VS code?

Launch configurations. To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and VS Code will try to run your currently active file.


2 Answers

I have found one way, not very intuitive, but it works:

  • create a new Visual C++ project and solution (it may be created anywhere, but a location next to the mdmp file seems convenient)
  • or use a Visual C++ project and solution you normally use to build the executable
  • set up source location in Solution (Right click) > Common Properties > Debug Source Files > Directories containing source code
  • open the crash dump using File > Open > File > select Dump Files as a filter

Note: crash dump analysis guides on the internet can be misleading when they are not recent enough, as dump files are no longer opened as projects since 2010, they are opened as files instead. See a note by R Nitzel in the MSDN Crash Dump Analysis article.

like image 108
Suma Avatar answered Oct 06 '22 04:10

Suma


You should be able to specify the directories containing the source code with:
Solution (Right click) > Common Properties > Debug Source Files > Directories containing source code

like image 45
lolando Avatar answered Oct 06 '22 04:10

lolando