从Visual Studio 2012调试VB6代码 [英] Debugging VB6 Code From Visual Studio 2012

查看:131
本文介绍了从Visual Studio 2012调试VB6代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个.NET应用程序,它使用了许多用VB6编写的旧组件.我们能够使用本机代码调试器调试VB6代码,并在Visual Studio 2010中生成了pdb文件.升级到VS 2012(包括Update 2)后,我们无法执行此操作.

模块窗口显示以下消息:

二进制文件不是用调试信息构建的.

您还可以在输出窗口中找到以下消息:

模块不带符号.

当我尝试手动加载符号时,出现以下消息:

在此文件夹中找不到匹配的符号文件.

从VS 2010调试完全相同的dll或exe可以正常工作.

是否有启用它的选项?

我终于找到了如何使用Visual Studio 2012启用调试VB6组件的方法.总之,您必须首先通过设置选项|选项来启用旧的pdb格式.调试|编辑并继续|启用本机编辑并继续",然后您可以照常连接到dllhost.exe.

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?

解决方案

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.

这篇关于从Visual Studio 2012调试VB6代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆