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

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

问题描述

我有.NET 3.5 Web应用程序,它使用VB6中创建的一些COM DLL。
我有两个源代码。还有我的COM DLL的pdb文件。
我想在Visual Studio 2010中加载VB6 dll代码进行调试。



我可以从VS进入dll代码如果我加载了COM应用程序在VB6 IDE中。
由于我是VB的新手,使用VB6 IDE进行调试对我来说有点乏味。
所以我想调试Visual Studio 2010中的COM应用程序代码。



我按照



问题是VS2010自动为相应的COM DLL创建Interop dll,
,它仅使用Interop dll。当我尝试手动加载COM dll的Symbol文件(让我们说MyComApp.dll)时调试它失败,VS指示我加载Interop.MyComApp.pdb文件。但是我只有MyComApp.pdb。



我该如何使这项工作?

解决方案

您无法在Visual Studio 2010中调试任何高于编译汇编代码的级别的VB6代码。



然而,您可以将VB6 dll项目转换为VB 2010,然后在Visual Studio 2010中使用它。
只需将VB6项目拖放到Visual Studio 2010(将项目拖动到VS 2010然后放下),升级向导会自动转换。
或者只是使用Artinsoft程序。
祝你好运! :)


I have .NET 3.5 web application which uses some COM dll created in VB6. I have source code for both. Also I have pdb file for the COM dll. I would like to load the VB6 dll code inside Visual Studio 2010 for debugging.

I am able to step into dll code from VS If I loaded the COM app in VB6 IDE. Since I am new to VB, debugging using VB6 IDE is bit tedious for me. So I wanted to debug the COM app code inside Visual Studio 2010.

I followed the instructions in Robgruen's Blog

The problem is VS2010 automatically creating Interop dll for the corresponding COM dll, and It uses the Interop dll only. While debugging when I try to manually load the Symbol file for the COM dll(let's say MyComApp.dll) It fails and VS is instructing me to load Interop.MyComApp.pdb file. But I have MyComApp.pdb only.

How do I make this work?

解决方案

You can not debug VB6 code in Visual Studio 2010 at any level higher than the compiled assembly code.

You can however convert your VB6 dll project to VB 2010 then use it in Visual Studio 2010. Just drag and drop your VB6 project to Visual Studio 2010 (drag project to icon of VS 2010 then drop) and upgrade wizard will automatically convert it. Or just use Artinsoft programs. Good Luck! :)

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

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