NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

C - when debugging I see <optimized out> variables

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
Lohik



Joined: 09 Nov 2016
Posts: 1

PostPosted: Wed Nov 09, 2016 11:54 am    Post subject: C - when debugging I see <optimized out> variables Reply with quote

Hi,

Hope someone will help... When I am debugging my C project in netbeans and go to "Variables" section, I see, that most of variables are <optimized out>.

I want them visible of course, so I have googled, that I have to turn off optimization of compiler, so I set "Development mode" in project properties on Debug, which means compile only -c -g, but no -O), but it seems that doesn´t help. When I add -O0 in PROJECT->PROPERTIES->BUILD->C COMPILER->Additional Options, no change either.

I use gcc and newest Netbeans on Linux Mint.

Here is my "clean build command", maybe I am missing something, I am new to C and compiling.

gcc -O0 -c -g -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.c

Thank you for your answers!!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo