Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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)

    cl
    -c
    -FI..\..\xplat\proj\win\src\stdafx.h
    -Yu..\..\xplat\proj\win\src\stdafx.h
    -Fp"kJams 2 Debug_pch.pch"
    -nologo
    -Zc:wchar_t
    -FS
    -Zc:rvalueCast
    -Zc:inline
    -Zc:strictStrings
    -Zc:throwingNew
    -Zc:referenceBinding
    -Zc:__cplusplus
    -MP
    -Zi
    -MDd
    -W3
    -w34100
    -w34189
    -w44996
    -w44456
    -w44457
    -w44458
    -wd4577
    -wd4467
    /wd4100
    -EHsc
    /Fd"kJams 2 Debug.vc.pdb"
    -DUNICODE
    -D_UNICODE
    -DWIN32
    -D_ENABLE_EXTENDED_ALIGNED_STORAGE
    -DWIN64
    -DkDEBUG
    -DKJAMS_PRO
    -DKJAMS_2
    -D_QT_=1
    -D_YAAF_=0
    -DQT_DEPRECATED_WARNINGS
    -DCOMPILING_ON_10_4_OR_BETTER=1
    -DCOMPILING_ON_10_5_OR_BETTER=1
    -DCOMPILING_ON_10_6_OR_BETTER=1
    -DCOMPILING_ON_10_7_OR_BETTER=1
    -DCOMPILING_ON_10_8_OR_BETTER=1
    -DCOMPILING_ON_10_9_OR_BETTER=1
    -D_KJAMS_
    -DSQLITE_ENABLE_FTS3
    -DSQLITE_ENABLE_FTS3_PARENTHESIS
    -DSQLITE_ENABLE_COLUMN_METADATA
    -DQT_DISABLE_DEPRECATED_BEFORE=0x060000
    -DOPT_MACOS=0
    -DOPT_WINOS=1
    -D__STDC_LIMIT_MACROS
    -D__STDC_CONSTANT_MACROS
    -DNO_ERRNO_H
    -DID3LIB_LINKOPTION=1
    -D__LP64__=1
    -D__LLP64__=1
    -DkDEBUG
    -D__WIN32__
    -D_WINDOWS
    -DWIN32
    -D_WIN32
    -DTARGET_RT_LITTLE_ENDIAN=1
    -DTARGET_RT_BIG_ENDIAN=0
    -DPRAGMA_STRUCT_PACKPUSH=1
    -D_DEBUG
    -DBOOST_USE_WINDOWS_H
    -DBOOST_THREAD_USE_LIB
    -DHAVE_CONFIG_H
    -DQT_MULTIMEDIAWIDGETS_LIB
    -DQT_WIDGETS_LIB
    -DQT_MULTIMEDIA_LIB
    -DQT_GUI_LIB
    -DQT_SQL_LIB
    -DQT_NETWORK_LIB
    -DQT_CORE_LIB
    -I..\..\kJams
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtMultimediaWidgets
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtWidgets
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtMultimedia
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtGui
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtANGLE
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtSql
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtNetwork
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtCore
    -I.
    -I/include
    -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc
    -Fo
    @C:\Users\davec\AppData\Local\Temp\CBrowser_Track.obj.9368.7328.jom
    

  • 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