Debugging


How to debug Episerver dlls

Sometimes you will run into trouble while using Episervers functions. One way to resolve the problem could be to debug and search the source code, which I have done a couple of time to find diffuclt problems. I will show one way to to it using Jetbrains dotPeak.

You may download dotPeak from Jetbrains homepage. You need it to setup a symbol server that will be used in Visual Studio.

 

1. Start dotPeak and enable the symbol server

 
 
2. Connect the symbol server in Visual Studio to the one you just started.
You will find it at: Tools > Options -> Debugging -> Add new
 
 
 
3. Create the Pdb files inside dotPeak that you like to debug. You should probably take more than you think you need...
Just add the DLL to dotPeak, right click and then chooce "Generate Pdb..."
 
 
 
4.  Now you have two posibilites to set breakpoint inside the DLL you want to debug:
  a. Choose Debug -> New Breakpoint > Break at function (inside Visual studio).
     There you may enter the namespace and function manually.
 
  b. Open Assembly Library/Explorer inside Visual Studio and navigate to the file you want to debug to add the breakpoint. 
 
5. Start debugging inside Visual Studio as normal and dont forget to start the symbol server
 

Published: 2016-08-26