| Author |
Message |
jhollz89
Joined: 01 Mar 2011 Posts: 2
|
Posted: Tue Mar 01, 2011 4:15 pm Post subject: Debugging .Net aasemblies like Sytem.Web |
|
|
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 |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Wed Mar 02, 2011 4:53 pm Post subject: |
|
|
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 |
|
 |
jhollz89
Joined: 01 Mar 2011 Posts: 2
|
Posted: Wed Mar 02, 2011 7:57 pm Post subject: |
|
|
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 |
|
 |
|
|
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