问题描述
我必须回到过去并调试VB6表单。它在应用程序(不是我们的Esri ArcMap.exe)中使用。我看到VB6具有一些调试功能,但是在.NET中却看不到启动另一个应用程序或附加到正在运行的应用程序的功能。
I have to travel back in time and debug a VB6 form. It is used inside an application (not ours, Esri ArcMap.exe). I see VB6 has some debug capabilities, but nowhere do I see, like in .NET, the ability to "launch another app" or "attach" to a running application.
如何在第三方应用程序中运行时调试VB6代码?
How can I debug my VB6 code while running inside a 3rd party application?
推荐答案
是正确的那里;您只是没看到它。
It's right there; you just didn't see it.
如果您的表单托管在DLL中(很可能来自您的描述),则有两个选项,可以同时设置这两个选项从项目-> 项目名称属性对话框的调试选项卡中。
If your form is hosted inside a DLL (most likely from your description), you have two options, both of which can be set from the "Project"-> "Projectname Properties" dialog box, Debugging tab.
-
等待组件被创建。
单击运行()时,VB6会更改DLL的注册表项,以便它们指向VB6调试器。
照常启动第三方程序。
当任何程序试图创建由DLL托管的对象和表单时,它将通过调试器来完成。
"Wait for components to be created"
When click on Run (), VB6 will alter the registry entries for your DLL so that they point to the VB6 debugger.
Launch your third-party program as usual.
When any program tries to create objects and forms hosted by your DLL, it will do so through the debugger.
启动程序
与以前相同,加 VB6将执行在对话框中输入的命令行。
"Start a program"
Same as before, plus VB6 will execute the command line entered in the dialog box.
应注意,VB6必须以完全管理员身份模式运行,因为它需要写入通常受保护的区域
It should be noted that VB6 must be run in full "As Administrator" mode, because it needs to write to normally-protected areas of the registry.
不用担心第三个选项。我们只是说一些事情会更好地被遗忘。
Don't worry about the third option. Let's just say that some things are better forgotten.
这篇关于在第三方应用程序中调试vb6表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!