I'm using Visual Studio Code on Ubuntu 18.04 to write some C++ code using external libraries. I'm not sure why, but whenever I run the debugger, the contents of most variables doesn't show.
I've attached an example of this issue.
Why is this happening?
Edit:
cmake_minimum_required(VERSION 3.10.2)
project(Proj)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
set(ARENA_DIR "~/Arena")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CC "g++")
set(CFLAGS "-Wall -g -O2 -std=c++14 -Wno-unknown-pragmas")
add_definitions(${CFLAGS})
set(RM "rm -f")
include_directories(${ARENA_DIR}include/Arena)
include_directories(${ARENA_DIR}include/GenTL)
include_directories(${ARENA_DIR}include/Save)
include_directories(${ARENA_DIR}GenICam/library/CPP/include)
...
set(ARENA_DEBUG_LIBS
${ARENA_DIR}libarenad.so
${ARENA_DIR}libsaved.so
${ARENA_DIR}libgentld.so)
set(ARENA_RELEASE_LIBS
${ARENA_DIR}libarena.so
${ARENA_DIR}libsave.so
${ARENA_DIR}libgentl.so)
set(LIBS
${GENICAMLIBS}
${FFMPEGLIBS}
"/usr/lib/x86_64-linux-gnu/libpthread.so")
add_executable(main main.cpp)
set_target_properties(main PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
target_link_libraries(main ${LIBS} debug ${ARENA_DEBUG_LIBS})
target_link_libraries(main ${LIBS} optimized ${ARENA_RELEASE_LIBS})
Edit 2:
After changing the g++ flag to -O0 instead of -O2, I get this result:
But I would expect to be able to see the object's properties.