First, I created a testing assembly HelloWorld.dll
which I want to debug and built it with release configuration.
namespace HelloWorld
{
public class HelloClass
{
public string SayHello(string name)
{
return "Hi " + name + "!";
}
}
}
Then I created standart ASP.NET MVC project and:
HelloWorld.dll
assemblyModified HomeController's About
method
public ActionResult About()
{
var testingClass = new HelloClass();
ViewBag.Message = testingClass.SayHello("John");
return View();
}
Via .NET Reflector Object Browser decompiled HelloWorld assembly
~/Home/About
pageResult: Brekpoint is never hit.
When I go to Debug -> Windows -> Modules
it seems that symbols for HelloWorld.dll
assembly was loaded:
So, what am I doing wrong?
EDIT: I am using Visual Studio 2015 Update 1 and RedGate Reflector 8.5
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
To do this, go to the Modules window and from the context menu of a . NET assembly, and then select the Decompile source code command. Visual Studio generates a symbol file for the assembly and then embeds the source into the symbol file. In a later step, you can extract the embedded source code.
After hours and hours of research and contacting RedGate support it seems to be a bug in their software.
Workarounds:
.NET Reflector -> Generate PDBs
and select C# version
to v4.5
. Reflector has some problems with C# version v4.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With