HOWTO: Debug a Visual Basic DLL from Visual InterDev
ID: Q200998
|
The information in this article applies to:
-
Microsoft Visual InterDev, version 6.0
-
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0
SUMMARY
This article demonstrates how to debug a Visual Basic ActiveX DLL using Visual InterDev 6.0 or later.
MORE INFORMATION
Visual Basic needs to be installed on the machine where Visual InterDev is installed.
Step-by-Step Example
- Start Visual Basic on the machine where Visual InterDev will be used for debugging and create a new ActiveX DLL.
- Change the name of the project to MyVBComponent.
- Change the name of the Class module to CMyClass.
- Add the following code to the DLL:
Public Function DebugTest (vntNum1 as Variant, vntNum2 as Variant) as Variant
DebugTest = vntNum1 + vntNum2
End Function
- From the File menu, select Make MyVBComponent.dll.
- Set a breakpoint on the "DebugTest = vntNum1 + vntNum2" line in the DLL.
- From the Run menu, select Start (F5) to run the program
- Start Visual InterDev and add a new Active Server Pages (ASP) page to the project.
- Add the following code to the new ASP page:
<%
Dim objMyComponent, vntNum1, vntNum2, vntResult
vntNum1 = 1
vntNum2 = 2
Set objMyComponent = Server.CreateObject("MyVBComponent.CMyClass")
vntResult = objMyComponent.DebugTest(vntNum1, vntNum2)
Response.Write(vntResult)
%>
- Place a breakpoint within the ASP page on the line calling the DebugTest method.
- Right-click on this ASP page within Visual InterDev's Project Explorer and select Set As Start Page.
- From the Debug menu, select Start (F5) to run the program.
NOTE: If your project is not already configured within Internet Information Server (IIS) for debugging, Visual InterDev will prompt you to set this up. Click Yes from all the dialog boxes presented by Visual InterDev, and Visual InterDev will configure this automatically. Also note that the function keys used for debugging are different in Visual InterDev and Visual Basic.
Additional query words:
Keywords : kbDebug kbVBp600 kbVisID600 kbGrpASP
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: August 8, 1999