HOWTO: Debug a Visual Basic DLL from Visual InterDev

ID: Q200998


The information in this article applies to:


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

  1. Start Visual Basic on the machine where Visual InterDev will be used for debugging and create a new ActiveX DLL.


  2. Change the name of the project to MyVBComponent.


  3. Change the name of the Class module to CMyClass.


  4. Add the following code to the DLL:
    
    Public Function DebugTest (vntNum1 as Variant, vntNum2 as Variant) as Variant
           DebugTest = vntNum1 + vntNum2
       End Function 


  5. From the File menu, select Make MyVBComponent.dll.


  6. Set a breakpoint on the "DebugTest = vntNum1 + vntNum2" line in the DLL.


  7. From the Run menu, select Start (F5) to run the program


  8. Start Visual InterDev and add a new Active Server Pages (ASP) page to the project.


  9. 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)
       %> 


  10. Place a breakpoint within the ASP page on the line calling the DebugTest method.


  11. Right-click on this ASP page within Visual InterDev's Project Explorer and select Set As Start Page.


  12. 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