This question is locked. New answers and comments are not allowed.
Hello!
I am using Visual Studio 2013 and I just downloaded JustCode and tried to debug decompiled code (.NET System.Web.dll). Breakpoints work, but I cannot see the values of the variables. Immediate window reports as follows:
Cannot obtain value of local or argument '<this>' as it is not available at this instruction pointer, possibly because it has been optimized away.
Also, when I try to set a break point condition with this, the debugger says:
Could not evaluate expression
Sometimes the error message is as follows:
Cannot evaluate expression because the code of the current method is optimized.
Is this normal behaviour, or is there a trick how to see variable values, since without them debugging is quite useless.
Thanks,
Tommi
I am using Visual Studio 2013 and I just downloaded JustCode and tried to debug decompiled code (.NET System.Web.dll). Breakpoints work, but I cannot see the values of the variables. Immediate window reports as follows:
Cannot obtain value of local or argument '<this>' as it is not available at this instruction pointer, possibly because it has been optimized away.
Also, when I try to set a break point condition with this, the debugger says:
Could not evaluate expression
Sometimes the error message is as follows:
Cannot evaluate expression because the code of the current method is optimized.
Is this normal behaviour, or is there a trick how to see variable values, since without them debugging is quite useless.
Thanks,
Tommi
5 Answers, 1 is accepted
0
Hello Tommi,
Zdravko
Telerik
Thanks for contacting us.
This is an expected behavior. In some cases the value can not be provided and we are aware of this. Unfortunately, there is nothing we can do to improve it.
Thank you.
Zdravko
Telerik
0
Bart Plasmeijer
Top achievements
Rank 1
answered on 03 Sep 2014, 09:26 AM
@Telerk - can you explain why this happens?
Thanks
Bart
Thanks
Bart
0
Hello,
This behavior occurs because the part of code that is being debugged was optimized by the compiler during compilation.
Because of compiler optimizations it is possible that you may not be able to add breakpoints at specific places or watch the value of a given member or variable.
If you have any more questions or remarks, please do not hesitate to contact us again!
Regards,
Ivan
Telerik
This behavior occurs because the part of code that is being debugged was optimized by the compiler during compilation.
Because of compiler optimizations it is possible that you may not be able to add breakpoints at specific places or watch the value of a given member or variable.
If you have any more questions or remarks, please do not hesitate to contact us again!
Regards,
Ivan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
kittykitty
Top achievements
Rank 1
answered on 10 Nov 2014, 08:00 AM
This actions happens because the aspect of rule that is being debugged was enhanced by the compiler during collection.
Because of compiler optimizations it is possible that you may not be able to add breakpoints at particular locations or observe the value of a given participant or varying.
Because of compiler optimizations it is possible that you may not be able to add breakpoints at particular locations or observe the value of a given participant or varying.
0
Lorenzo
Top achievements
Rank 1
answered on 21 Nov 2014, 12:32 PM
Hi, just in case.....
I faced the same problem and to me turned out to be just the fact that VS was in Release mode instead of DEBUG !
I understand the problem might be much more complex than so, but my mistake produced the same kind of error message, so I thought to report it.
Lorenzo
I faced the same problem and to me turned out to be just the fact that VS was in Release mode instead of DEBUG !
I understand the problem might be much more complex than so, but my mistake produced the same kind of error message, so I thought to report it.
Lorenzo