icsharpcode / RefactoringEssentials

Refactoring Essentials for Visual Studio
MIT License
638 stars 119 forks source link

RefactoringEssentials.pdb is not included in .vsix #240

Open donid opened 8 years ago

donid commented 8 years ago

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).

Rpinski commented 8 years ago

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.

donid commented 8 years ago

@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.

Rpinski commented 8 years ago

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.

donid commented 8 years ago

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?

Rpinski commented 8 years ago

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

You're right, I tried different things:

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

Rpinski commented 8 years ago

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).