Important: Please read the Qt Code of Conduct -

debugging: vars "not accessible" ?

  • i am getting this a lot :

    Screen Shot 2020-11-20 at 5.09.57 PM.png
    see that skuP ? i should definitely be able to see inside it. why not? i am in debugging, and the build config is set to "debug" mode too... so what gives?

  • Qt Champions 2017

    Compiler, debugger? What's the compile line you used?
    It's possible to have partial/incomplete debug information. I've had a similar problem debugging into Qt, where the compiler did reorder the code (in debug mode mind you) due to partially optimized debug build being used (a flag enabled it, which after being removed fixed it for me).

  • what do you mean "what is the compile line" ? if this helps, here:

    Screen Shot 2020-11-20 at 10.43.48 PM.png

    i don't have any optimize flags set in the pro file

  • Qt Champions 2017

    @davecotter said in debugging: vars "not accessible" ?:

    what do you mean "what is the compile line" ?

    The line that is used to compile the code in question, that is, the effective call to the compiler (you can peek at it in the "Compile output" pane in Creator, which it seems is what you're using). For me it looks like this:

    g++ -c -pipe -fvisibility=hidden -g -std=gnu++11 -frtti -D_REENTRANT -Wall -Wextra -fPIC -DRTS_SHARED -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../lib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I.ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/MySourceFile.o MySourceFile.cpp

  • on windows, in a file that shows NOTHING in the vars panel, the compile line is this (broken onto separate lines for easier reading, and i omitted a lot of the "include" lines)

    -Fp"kJams 2 Debug_pch.pch"
    /Fd"kJams 2"

  • Qt Champions 2017

    Well, I don't see anything out of the ordinary. I'd suggest trying to add /Od in any case (even though it's the default, supposedly). If that doesn't help, perhaps try dropping the precompiled header flags.

Log in to reply