Tutorial: Qt Creator won’t load my .PDB file

TLDR: Use Visual Studio Debugger instead. You can still use Qt Creator for editing, just attach the Visual Studio Debugger instead at RunTime.

Scenario: I am writing a software program. I am using Qt Creator on Windows. I have some third party library for which I have the .pdb file.

Oh no! It crashey! My software! Oh nos!

I launch in Debug mode,

and then I recreate the crash,

ok good, I catch the exception and go to look at my stack trace,

This is not what I wanted. It is showing me machine code.

I’ve got my .pdb files right next to my dlls. What’s the problem? Why isn’t Qt Creator loading my Debug Symbols?

After some Googling, I decide that I don’t know, and I don’t care.

Let’s use Visual Studio instead, which a far more mature C++ editor on Windows.

Launch the program in “Run Mode” from Qt Creator,

Then switch over to Visual Studio,

Choose Debug -> Attach to Process

Then type into the search box the name of the .exe of the program you launched from Qt Creator,

Okay, now you’ve attached the Debugger from Visual Studio. This Debugger is far more likely to be able to detect and load your .pdb file,

so your stack trace will actually be able to step through your third party library code using your .pdb files.

Research and Development | Dev Ops | Software Engineer | Topaz Labs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store