RefactoringEssentials icon indicating copy to clipboard operation
RefactoringEssentials copied to clipboard

RefactoringEssentials.pdb is not included in .vsix

Open donid opened this issue 8 years ago • 6 comments

My VS reported a crash in ConvertInstanceToStaticMethodCodeRefactoringProvider and I wanted to debug it, but the folder where the extension is installed did not contain RefactoringEssentials.pdb (it does contain a RefactoringEssentials.VsExtension.pdb, though).

donid avatar Jul 07 '16 09:07 donid

Sorry for the late reaction, I've added RefactoringEssentials.pdb to VSIX package, so you should be able to debug your crash with latest development build.

Rpinski avatar Aug 19 '16 14:08 Rpinski

@Rpinski Thanks, but something is weird: VS loads the PDB, but when I double-click on the call-stack it prompts "The source file is different from when the module was build"! I have made sure that VS uses the 196f8f2 version of ConvertInstanceToStaticMethodCodeRefactoringProvider.cs. The file seems to be really different, because VS can't set breakpoints on the first 3 lines of the PerformAction method.

donid avatar Aug 22 '16 11:08 donid

How did you load the PDB? I've installed latest RE development build in VS, started a 2nd instance and attached it to 1st one. Then extracted PDB file from VSIX, added it in debugger settings. After VS has loaded the symbols, I was able to set breakpoints and execution stopped at them as expected.

Rpinski avatar Aug 25 '16 23:08 Rpinski

I just tried it on a different machine (VM) with the same result as before. I am using the same method that you have described - except: why do you have to extract the PDB? The VSIX-install procedure extracts PDB and DLL to the same folder, so the debugger will find and load it automatically!? So you have used PDB and DLL from the V4.3.394 VSIX from the link you have mentioned above? Could you the please provide the SHA1-Hash of the "ConvertInstanceToStaticMethodCodeRefactoringProvider.cs"-file that you used to set breakpoints?

donid avatar Aug 26 '16 10:08 donid

(Git) SHA1 Hash of my file is: 83a6f2dd19ea19cc10bcb874b1d686e7446bb101

You're right, I tried different things:

  • When building the VSIX package locally (Release build), installing and debugging it that way, it works after manually loading the symbols through Tools / Options / Debugging / Symbols / Symbol file (*.pdb) locations.
  • When using 4.3.394 package from VSIXGallery, I face the same problem as you.

Need to find out what's so special about our automatic builds.

Rpinski avatar Aug 28 '16 18:08 Rpinski

At least there is a temporary workaround:

Tools / Options / Debugging / General / Uncheck "Require source files to exactly match the original version"

As soon as VS reaches the breakpoint, it asks for the code file (which you have to select then).

Rpinski avatar Aug 28 '16 18:08 Rpinski