Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging VB6 Code From Visual Studio 2012

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?

like image 363
Pecan Avatar asked May 07 '13 11:05

Pecan


People also ask

How do I enable debugging in Visual Studio 2010?

Immediate Window (Ctrl +D, I) You should first start the application in debugging mode by using F5 and then open this window. This is a shortcut utility to open other debugging windows; for instance, the Breakpoint window by writing '>bl', the call stack window by writing'>callstack', and so on.

How do I enable debugging in Visual Studio?

To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.


1 Answers

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.

like image 199
Pecan Avatar answered Sep 20 '22 20:09

Pecan