How to check all local variables using Xcode 6.1 C ++ debugging mode

I use Xcode 6.1 to debug my C ++ code, and I found that some local variables do not appear in the debug area even when I use the "All Variables" option.

I am wondering how to add these variables to the debug list?

Or how to print these missing variables on LLDB? I tried with po test, but he said:

error: use of undeclared identifier 'test'

Would I rather switch to the Eclipse IDE for C ++?

By the way, I'm using CMake to create an Xcode project, so maybe I will miss something in debug mode? I remembered that if I use gcc, I need the -g option, do I need it when I use CLang?

+4
source share
2 answers

Xcode works well enough to encode C ++ from code completion and highlighting the point of view, second only to Visual Studio, but debugging through Apple lldb will be very successful or skipped. The templates will be the worst, often you will get errors about the inability to materialize the target or other archaic, rabid errors related to the debugger, confused about what you ask or cannot find functions.

Unfortunately, this was the case for several versions, and it seems that C ++ is in second place in objective-c, and it will probably be fast too; this probably will not be fixed.

You probably won't have a better time with Eclipse, and you will sacrifice a lot of code completion, profiling, static analysis, etc.

- , , . , , , , . 21- , , , std:: cerr: (

+1

"undefined", , , , . -O0 , . , , , :

int test = 0;

(, -), , . clang, gcc.

. lldb . "p" ( , ..). .

- "-", . " ", . , , .., .

, "frame variable", "p" , , , , bugreporter.apple.com, d .

" ", , , , . , , -O0, . , , , , , .

+1

Source: https://habr.com/ru/post/1569502/


All Articles