Error Cannot Obtain Value Enum
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 site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or cannot obtain value of local or argument optimized away posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss visual studio 2015 cannot obtain value 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
Complus_zapdisable=1
takes a minute: Sign up Cannot obtain value 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
Cannot Obtain Value Of The Local Variable Or Argument Because It Is Not Available
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 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 the value of the local or argument is unobtainable at this time using Debug build. Cannot obtain value of local or argument '
the debugger prints 'error: cannot obtain value'. Also, inspecting a pointer of a derived class through it's base class pointer looses the ability to see what the derived class is. For example, take the following code- class
Cannot Evaluate The Expression Because The Code Of The Current Method Is Optimized
base_t { int a; public: base_t() : a( 0 ) { } virtual ~base_t() { visual studio disable optimization } }; class der_t : public base_t { int b; public: der_t() : b( 1 ) { } }; int main( int argc, visual studio 2015 turn off optimization const char* * argv ) { der_t* d = new der_t; base_t* b = d; return 0; } inspecting d with the debugger shows both the members of base_t and der_t; + d + base_t - a - http://stackoverflow.com/questions/8311303/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruct b inspecting b with the debugger only shows the members of base_t. + b - a If I turn off the /clr flag, inspecting b shows both the __vfptr as well as that it's actually a der_t. + b + der_t + base_t - b + __vfptr - a Am I doing something wrong? Is this just the way managed code works? I need to mix both managed and unmanaged C++ and this is making debugging very http://www.experchange.com/problems-debugging-c-objects-compiled-with-t2514958 difficult. Thanks- John Gary Chang[MSFT] (11-03-06, 07:37 AM) Hi John, >Am I doing something wrong? Is this just the way >managed code works? You are right, that VS2005's behavior is as expected. When you compile your native C++ code to managed code, some native C++ language feature/debuggibg info will be lost. Thanks! Best regards, Gary Chang Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at . ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Gary Chang[MSFT] (11-03-06, 07:53 AM) Hi John, One workound is to prevent your native code from compiling into managed code in your mixed application. To do this, you can use the "managed, unmanaged" processor to wrap your navice
obtain value' on any variable (DataSet in my case) even when the information is passed correctly from the DataTier into the DataSet. What http://www.zubairahmed.net/?p=85 was interesting about this error is that it never happened to any http://www.vbforums.com/showthread.php?585708-RESOLVED-Error-cannot-obtain-value-in-Watch other DataSet in the same class. After googling for the problem, I found out that following the insertion to the DataSet, my class had a call to a function with apparently more parameters than VS Debugger can handle and therefore the error. This looks like an issue with cannot obtain the Debugger that requires attention of our friends at MS. « Too many things, Too little time Cache Access Pattern and updating it frequently » Software Developer. Blogger. Speaker Subscribe to RSS feed Follow @zubairdotnet Zubair Ahmed on Twitter Counter Search for: Archives Select Month March 2015 (1) November 2014 (1) June 2014 (1) January 2014 (1) December cannot obtain value 2013 (2) September 2013 (3) July 2013 (3) May 2013 (1) April 2013 (1) January 2013 (1) November 2012 (1) September 2012 (2) August 2012 (1) July 2012 (1) June 2012 (1) May 2012 (1) April 2012 (3) March 2012 (3) October 2011 (1) September 2011 (1) July 2011 (1) June 2011 (1) May 2011 (1) April 2011 (1) February 2011 (1) September 2010 (2) July 2010 (4) June 2010 (1) May 2010 (1) January 2010 (1) November 2009 (2) October 2009 (2) August 2009 (2) July 2009 (1) May 2009 (2) April 2009 (2) December 2008 (1) November 2008 (2) June 2008 (4) May 2008 (2) April 2008 (4) February 2008 (1) January 2008 (1) December 2007 (2) November 2007 (3) October 2007 (1) July 2007 (3) June 2007 (2) May 2007 (3) April 2007 (4) March 2007 (2) September 2006 (1) August 2006 (2) July 2006 (3) June 2006 (1) May 2006 (3) April 2006 (2) March 2006 (3) February 2006 (1) January 2006 (2) December 2005 (3) November 2005 (4) October 2005 (3) Septem
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 Beginn