Error Cannot Obtain Value Asp Net
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this complus_zapdisable=1 site About Us Learn more about Stack Overflow the company Business Learn more
Cannot Evaluate The Expression Because The Code Of The Current Method Is Optimized
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Visual Studio Disable Optimization
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot obtain value
Disable Visual Studio Hosting Process
of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away up vote 54 down vote favorite 9 Visual Studio 2010 kills (there is no other word) data in one of the functions argument in unsafe block. What could cause this error? The following message shows by the debugger. Cannot obtain value of local or visual studio 2015 turn off optimization argument as it is not available at this instruction pointer, possibly because it has been optimized away. c# visual-studio-2010 debugging share|improve this question edited May 2 '13 at 12:42 skumar 4,37462445 asked Nov 29 '11 at 13:12 curiousity 1,01311732 2 i have exactly the same problem and i'm using Debug build. Cannot obtain value of local or argument '
Osenkov - MSFTJanuary 27, 20093 0 0 0 Sooner or later you may run into a situation where you need to evaluate a local variable under debugger and all you get is this: "Cannot obtain value of local or argument ‘whatever' variable is optimized away and not available as it is not available at this instruction pointer, possibly because it has been the breakpoint failed to bind optimized away'. Well, it turns out there are two different tricks to solve such problems: 1. Shawn Burke blogs about How to disable optimizations when debugging Reference Source. In a nutshell, you need to: Start VS with the Environment Variable COMPLUS_ZapDisable=1 Disable the VS Hosting Process (.vshost.exe) before you start debugging 2. Another tip is http://stackoverflow.com/questions/8311303/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruct from our VB IDE Dev Jared Parsons: Disabling JIT optimizations while debugging. Essentially, Jared points to create an .ini file with the same name as the application's .exe: [.NET Framework Debugging Control] GenerateTrackingInfo=1 AllowOptimize=0 He also points to the MSDN article http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx (Making an Image Easier to Debug). To be frank, this tip didn't work for me for some reason, but I guess it's still worth mentioning. Hope this https://blogs.msdn.microsoft.com/kirillosenkov/2009/01/27/how-to-disable-optimizations-during-debugging/ helps! Tags KnowledgeBase Comments (3) Cancel reply Name * Email * Website Mike says: February 23, 2011 at 12:37 pm The second suggestion worked for me. I was debugging a WCF service hosted as a windows service. Attaching to the process was causing the same error. I uninstalled the service in question. Created a new {myProjectName}.ini with the text editor of your choice with the above section and settings in the same folder as the exe which was installed. From there attaching to the process and breaking in no longer throws the "Cannot obtain value…" error. Reply Ethan Woo says: January 31, 2013 at 12:21 am Attaching to the process always shows the error for IIS hosting WebApp, after i debug with F5 for the Hosted WebApp, local variable can be evaluated. Reply Ab says: December 22, 2014 at 8:50 pm Second one worked for me. Thank you. Reply Follow UsPopular TagsCoding DevCenter VS 2010 Links KnowledgeBase LiveGeometry C# 4.0 Algorithm Silverlight WPF StructuredEditor .NET Roslyn Archives May 2016(1) April 2016(1) January 2016(3) December 2015(1) August 2015(1) June 2015(1) May 2015(1) April 2015(3) August 2014(1) July 2014(1) All of 2016(5) All of 2015(7) All of 2014(5) All of 2013(5) All of 2012(16) All of 2011(9
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Getting Started/error: cannot obtain value error: cannot obtain value RSS 5 replies Last post Aug 21, 2006 10:23 AM by ferrethouse ‹ http://forums.asp.net/t/1018920.aspx?error+cannot+obtain+value Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered http://www.vbforums.com/showthread.php?585708-RESOLVED-Error-cannot-obtain-value-in-Watch Threads Unresolved Threads Support Options Advanced Search Reply ferrethouse None 0 Points 96 Posts error: cannot obtain value Aug 18, 2006 06:03 PM|ferrethouse|LINK I haven't been working this project for a couple of weeks now. It compiled fine but it wasn't evaluating the value of one of my dropdownlists (ddlMB.SelectedItem.Text). When visual studio I put a watch on it I get this error... error: cannot obtain value This was working a couple of weeks ago and as far as I know nothing has changed. The strange thing is that the value of the dropdownlist isn't being evaluated properly on our testing box either so I don't think it is related to VS 2005 or my local IIS. Has error cannot obtain anyone else ever experienced this error? I don't know how to begin to resolve this. Thanks. Reply RajeshDev None 0 Points 3 Posts Re: error: cannot obtain value Aug 19, 2006 01:03 AM|RajeshDev|LINK Seems like ddlMB type has changed from DropdownList. You can delete and add a new control with the same name and see. Are you able to watch "ddlMB" if so then try adding watch on "ddlMB.SelectedItem" and see whether you are getting not null reference. Reply azamsharp Contributor 2831 Points 4534 Posts Re: error: cannot obtain value Aug 19, 2006 01:24 AM|azamsharp|LINK Please paste some code where you have used the ddlMB DropDownList! ASP.NET articles and videos HighOnCoding Reply ferrethouse None 0 Points 96 Posts Re: error: cannot obtain value Aug 19, 2006 01:01 PM|ferrethouse|LINK Here is the relevent code. As I mentioned above. It was not behaving like this two weeks ago and the code itself has not changed since then. It doesn't fail on the first two ddls but it does fail on ddlMB, ddlSpike,ddlDup1, etc.. Try If ddlInstrument.SelectedValue = -1 Then ERSLib.General.MessageBox.show("Please select a valid instrument.", "AQ") Exit Sub ElseIf ddlDataSet.SelectedValue = -1 Then ERSLib.Gene
value in Watch If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 8 of 8 Thread: [RESOLVED] Error: cannot obtain value in Watch Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Sep 28th, 2009,01:10 AM #1 scsfdev View Profile View Forum Posts Visit Homepage Thread Starter Addicted Member Join Date Feb 2008 Location Singapore Posts 224 [RESOLVED] Error: cannot obtain value in Watch Hi all, I'm facing a strange problem in VS.Net 2003 Debugger mode. I'm testing a window application which was written in VB.Net 2003. I set a few BreakPoints and Debug the project. When the debugger hit one of the breakpoints, it stops at there. Its correct. But when I try to add one of the variables to "Watch", it said "error: cannot obtain value". I tried to search the Net and found that some said "its because of structures", some said "its because of passing too many parameters." and some said "its because of too many line of codes (LOCs)". but my problem is not in passing parameters or too many line of code. the function i set breakpoint has only around 300 LOCs (including around 100 line of comments) And the value I tried to get is from my TreeView which is on my Win Forms. its very strange that I can't even get the value from Forms. I assign this TreeView value to another TreeView (this one is declare in code.) And this second TreeView also can't view Watch. What can I do for that? Any suggestions or any fixes? I'm using Visual Studio 2003 in VB.Net with SQL Server 2000 for the above project. Thanks. I'm using VS 2005 & 2008 & 2010 with SQL Server 2005 Express. My hobby beside programming: http://dslrstranger.wordpress.com Reply With Quote Sep 28th, 2009,01:27 AM #2 jmcilhinney View Profile View Forum Posts Visit Homepage .NUT Join Date May 2005 Location Sydney, Australia Posts 93,516 Re: Error: cannot obtain value in Watch If you are having a problem with some specific code, would it not be a good idea to show us that code? 2007-2016 Why is my data not saved to my database? | MSDN Data Walkthroughs MSDN "How Do I?" Videos: VB | C# VBForums Database Development FAQ My CodeBank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control Beginner Tutorials: VB | C# | SQL Reply With Quote Sep 28th, 2009,02:02 AM