By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,869 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,869 IT Pros & Developers. It's quick & easy.

Unable to see value in Watch. Message: "Cannot evaluate expression because the code of the current m

P: n/a
Hi;

My project file property is set to use "Visual Studio Development
Server". I am able to debug and see the corresponding values when I
mouseover but as soon as I change to the project file property to use
"IIS web server", I am unable to see the mouseover value.When I add a
watch, I get the following error "Cannot evaluate expression because the
code of the current method is optimized". I am sure its something I am
not doing right but I can't pinpoint it.

One of the lines where I see this problem is
ViewState["PreviousPageAbsolutePath"] =
Request.UrlReferrer.AbsolutePath.ToString();

Following are some of the things that I have tried:
a. having a project reference instead of a dll reference.
b. changing the configuration settings of all the projects to the debug
mode.
c. Tools=Options=Debugging=General=Check the box for "Suppress
JIT optimization on module load.

What could I be doing wrong?? Many thanks for all your help and
comments.

Kind Regards;

Ajit Goel
*** Sent via Developersdex http://www.developersdex.com ***
Apr 16 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.