Search code examples
debuggingnservicebuspdb-files

NServiceBus pdb/source stepping procedure?


I have an application with many projects that reference several NServiceBus NuGet packages. I have occasionally wanted to be able to step into the NSB sources to debug problems, but I don't know of a way to do this short of removing existing references all over the place and replacing them with references to the binaries that I have built myself. This would be, to put it mildly, a pain in the ass.

Is there any relatively easier way to achieve this? In Visual Studio, I turned off "Just My Code" and turned on "Step into .NET Framework Sources" and it seemed to have found PDBs on a symbol server somewhere. This caused the NSB stack frames to show up in the debugger, but Visual Studio will not let me browse to find the sources on my local drive(which I have gotten from GitHub.)


Solution

  • You can use a reflector tool. Specifically, have a look at the VSPro version.

    It will generate/reverse-engineer code directly from the assemblies/dlls that you're trying to debug and let you step into the code.