简体   繁体   中英

Visual Studio Debugger is Unloading Symbols for DLL

I've got a solution with a c++ executable, a c++ library and a C# library project. When I'm trying to debug the executable the symbol files for both dll's are first loaded and then unloaded: (showing one example)


'ur.exe' (Win32): Loaded 'C:\meinedateien\Dropbox\programme\urbs\ur\debug\ArchitectureCSLibrary.dll'. 
'ur.exe' (Win32): Loaded 'C:\meinedateien\Dropbox\programme\urbs\ur\debug\ArchitectureCSLibrary.dll'. 
'ur.exe' (Win32): Unloaded 'C:\meinedateien\Dropbox\programme\urbs\ur\debug\ArchitectureCSLibrary.dll'

This prevents me from debugging the Dll's. Any Ideas how I can keep VS from unloading the symbols? What am I doing wrong? (Everything is compiled from clean in debug mode and the "debug only own code"-option isn't checked)

Though the question was asked years ago, just wanted to post an answer so that it could be useful to someone.

Everything was looking great.

The pdb file was generated and copied to the running directory. The 'Symbol Status' column in the Module window of Visual Studio has "Symbols Loaded" as its status and yet the Output window had the "Loaded..." and then "Unloaded..." strings in it. Hence it prevented module debugging.

A detailed look into the project settings revealed that the "Debug Information Format" was set to "None". When changed it to something such as "Program Database (/Zi)" and then run this problem disappeared and the module became a debuggable one.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM