13
votes

We have a .NET application using a lot of legacy components written in VB6. We were able to debug the VB6 code using native code debugger and generated pdb files in Visual Studio 2010. After upgrading to the VS 2012 (including Update 2) we cannot do this.

The module window shows following message:

Binary was not built with debug information.

You can also find following message in the output window:

Module was built without symbols.

When I try to load symbols manually, I get following message:

A matching symbol file was not found in this folder.

Debugging the very same dll or exe from VS 2010 works fine.

Is there any option to enable it?

4
Do you use VC++ debugger for the task or what? - Ilya Kurnosov
Cannot answer your question, but would love to know more about debugging interop VB6 with VS2010! Sounds like a time saver for older mixed-language apps. - tcarvin
Find details about debugging VB6 in VS 2010 in this article - Pecan
Im currently trying to find a workaround to this for debugging VB6 on Server 2012. The fix below did not help me. i currently have a Micorosft Connect call logged connect.microsoft.com/VisualStudio/feedback/details/800624/… and a paid for support. i have narrowed the issue down to a problem with Server 2012 not being able to see that the dll was build with symbols. is anyone else still struggling with this? - ScottGuymer

4 Answers

10
votes

I found a solution that works on my machine (per Microsoft's comments on ScottG's paid support request - thanks, Scott). Apparently Visual Studio's default debugger after 2010 doesn't handle VB6 DLLs, but there's a checkbox to use the old debug engine, which does:

enter image description here

I didn't need to enable Native Edit and Continue.

9
votes

I have finally found how to enable debugging VB6 components using Visual Studio 2012. In short, you have to enable the old pdb format first by setting Options | Debugging | Edit and Continue | Enable native Edit and Continue and then you can attach to the dllhost.exe as usually.

2
votes

In VS 2015 Tools->Options->Debugging->General, select 'Use Native Compatibility Mode'. It sucks that I still need to debug VB6, but I am thankful that I am still able to.

1
votes

it seems that VS 2012 use msdia110.dll to decode symbol files, there's a DIA SDK sample in VS folder, you can test whether it can parse those VB pdb files. if it can't, i guess the new version DIA does not support old version pdb any more.