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

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

问题描述

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

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.

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

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

有什么选项可以开启吗?

Is there any option to enable it?

推荐答案

我终于找到了如何使用Visual Studio 2012 启用调试VB6 组件.总之,你必须先通过设置Options | 启用旧的pdb 格式.调试 |编辑并继续 |启用本机编辑并继续,然后您可以像往常一样附加到 dllhost.exe.

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天全站免登陆