需要帮助调试.net应用程序中使用的vb6代码 [英] Need help on debugging of vb6 code that is used in .net application

查看:66
本文介绍了需要帮助调试.net应用程序中使用的vb6代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.Net应用程序正在使用某些vb6控件和库。我无法通过.net应用程序调试vb6代码。有人可以帮我吗,如何调试在.net应用程序中用作用户控件的vb6代码。

My .Net Application is using some vb6 controls and libraries. I can not debug the vb6 code through my .net application. Can anybody help me out, how I can debug vb6 code that is using a s user control in .net application.

推荐答案

我是不确定您是否可以这样做,但是我从链接

I am not sure you can do it or not, but I have gotten some ideas from following link:


如果单击解决方案资源管理器中的我的项目,然后转到
调试选项卡,您将看到一个启动外部程序选项。
选择此选项,然后键入 C:\Program Files\Microsoft Visual
Studio\vb6.exe。 (带引号)。

If you double-click My Project in Solution Explorer and go to the Debug tab you'll see an option that says "Start External Program." Select this option and type in "C:\Program Files\Microsoft Visual Studio\vb6.exe." (with quotes).

此后,在命令行
参数(还带引号)中放置.vbp文件的完整路径。现在,当您运行VS时,会在VB6上启动
,并附带调试器。然后,您可以按照通常的方式设置并击中
断点。

After that, put the full path to your .vbp file in the command line arguments (also with quotes around it). Now when you run VS will fire up VB6, and the debugger's attached. You can then set and hit breakpoints in the normal way you're used to.

或者,您也可以使用工具->附加进行处理,但是我个人认为
第一种方法比较容易。您只需设置一次,然后设置
,就不必再担心了。

Alternately you can also do this using Tools->Attach to process, but personally I find the first approach easier. You set it up once and then you don't have to worry about it again.

要注意的一件事是,如果在VS2005中单击Stop,您的VB6程序
将退出而不提示您保存,因此,如果您在
中进行任何更改,则您的VB6项目请确保在按F5(在VB6中)之前单击保存。

One thing to watch for is if you hit Stop in VS2005, your VB6 program will exit without prompting you to save, so if you make any changes in your VB6 project make sure you click Save before pressing F5 (in VB6).

希望有帮助,如果您对此有任何疑问,请告诉我们。

Hope that helps, please let us know if you have any issues with this.

这篇关于需要帮助调试.net应用程序中使用的vb6代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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