| Author |
Message |
ChristianWeyer
Joined: 08 Oct 2009 Posts: 4
|
Posted: Thu Feb 18, 2010 11:38 am Post subject: Not able to see locals while debugging into decompiled code |
|
|
Hi there,
what could be the problem that I can step into decompiled code, but cannot actually see the values of the locals and variables?
E.g.
Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away
I mean, not seeing the values makes the debugging into third party code pretty much useless
Thanks! |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Thu Feb 18, 2010 1:32 pm Post subject: |
|
|
This will be due to the optimization that the runtime is doing, either at JIT time or ahead of time by the ngen compiler.
Our tool provides a pdb containing mappings between IL instructions and lines of source, and scoping information for local variables. Depending on optimizations that are happening, the debugger cannot always use this information to get all of the information you may like to see.
It's possible to make the optimizations less aggressive by having a debugger attached from the start of the session and by ngening assemblies to make them debuggable.
Do you have a particular example we can look at? |
|
| Back to top |
|
 |
ChristianWeyer
Joined: 08 Oct 2009 Posts: 4
|
Posted: Thu Feb 18, 2010 2:30 pm Post subject: |
|
|
It is the Microsoft.IdentitModel.dll.
In the meantime I managed to get it working by using the .ini file approach mentioned below:
[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0
http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx
Thanks. |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Thu Feb 18, 2010 2:55 pm Post subject: |
|
|
| Thanks - that's something I've done before to get less optimization. |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
|
| 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