Red Gate forums :: View topic - Debugging .Net aasemblies like Sytem.Web
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

Debugging .Net aasemblies like Sytem.Web

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
jhollz89



Joined: 01 Mar 2011
Posts: 2

PostPosted: Tue Mar 01, 2011 4:15 pm    Post subject: Debugging .Net aasemblies like Sytem.Web Reply with quote

I am tring to debug the following statement
string temp2 = (string)HttpContext.GetLocalResourceObject("~/Samples/Samples/Index.aspx", "ButtonsTest");

It will step into the code for Controller and ControllerContext but NOT the HttpContext.GetLocalResourceObject method where I have a breakpoint setup.

What is the trick to get .Net Reflector Pro to debug this. I am a newbie with this product.
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Wed Mar 02, 2011 4:53 pm    Post subject: Reply with quote

Hi. Sorry for the delay in replying.

For a simple test case that I have set up, stepping in to HttpContext.GetLocalResourceObject stops at the static Create method on VirtualPath.

I set a breakpoint on the GetLocalResourceObject by having the VirtualPath.cs file selected in VS and going File/Open/File. I then navigated to the HttpContext.cs file and put a breakpoint on the two static methods.

Looking in Debug/Windows/Modules for System.Web, you can see that the assembly is optimised. This means that some debuggability is lost. You can use ngen to regenerate the assembly with debugging enabled. You do this by putting an ini file next to the assembly and using ngen to regenerate it. There are a couple of forum posts that mention doing this.

Does that help?
Back to top
View user's profile Send private message
jhollz89



Joined: 01 Mar 2011
Posts: 2

PostPosted: Wed Mar 02, 2011 7:57 pm    Post subject: Reply with quote

Thanks I was able to get to the debug point after I set checkbox to off for
"Search the above locations only when symbols are loaded manually"
but it is weird because I did not have to do that with System.web.mvc only System.Web maybe a little bug or I was doing somehting else wrong.

But thank you for the note on optimization, I will seach the forum for that.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group