CDB in Qt Creator fails to debug Qt sources



  • Hi,
    Windows 10 with Qt 5.9 with MSVC binaries. Project managed by CMake.
    When I try to debug inside Qt sources - I see only assembly code.
    Qt is installed through online installer in c:\Qt\5.9 with Src, msvc2015 and msvc2015_64. There are debug libraries of Qt present (like c:\Qt\5.9\msvc2015\lib\Qt5Widgets.lib).
    However, call stack is as in attached image. System tries to look for source files in c:\users\qt\work\qt\qtbase\src\widgets\widgets.
    Creating symlink from c:\users\qt\work\qt to c:\Qt\5.9\Src didn't helped.

    alt text


  • Moderators

    @SebastianM said in CDB in Qt Creator fails to debug Qt sources:

    Creating symlink from c:\users\qt\work\qt to c:\Qt\5.9\Src didn't helped.

    Symlink?! o.O
    You are on windows. On MS Windows links are files. Not directly comparable to UNIX symlinks.

    Did you read this?



  • When I wrote symlink I meant

    mklink /d  c:\users\qt\work\qt c:\Qt\5.9\Src
    

  • Qt Champions 2016

    @raven-worx said in CDB in Qt Creator fails to debug Qt sources:

    On MS Windows links are files. Not directly comparable to UNIX symlinks.

    There has been support for symlinks in the filesystem from Win7 I believe, I don't know if they exposed it through the UI, though. But it is possible to create real symlinks, just like in Linux.

    @SebastianM

    Have you added the .pdb files to Creator? I think this was a mandatory step when you're working with CDB, unfortunately I don't have windows on hand to try it out, but the relevant page was somewhere in the debugger configuration pane. No symlinks should be needed, only to add the debug database files to the creator debugger config.


  • Moderators

    @kshegunov
    pdb files are present, otherwise the callstack wouldn't be visible. Also it is noted in the tooltip.
    Just the mapping to the sources is missing.

    @SebastianM
    did you read the link i've posted?



  • Hi,
    Thank you all for help.
    I've read once again "Setting Up Debugger" and used "Mapping Source Paths" section in place of Windows directory link.
    Now it works well.


  • Qt Champions 2016

    @raven-worx said in CDB in Qt Creator fails to debug Qt sources:

    Just the mapping to the sources is missing.

    Well, I thought this (the mapping) was done by the pdb, but I might've been wrong, it's been mighty long since I last built on windows.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.