Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How To Debug a Visual Basic Component Invoked Through the RDS.Dataspace


View products that this article applies to.

This article was previously published under Q247271

↑ Back to the top


Summary

Using Remote Data Services (RDS), specifically the RDS.Dataspace object, you can invoke remote business objects residing on a Web server running Internet Information Server (IIS). When these components are instantiated through the RDS.Dataspace object, the remote Visual Basic (VB) ActiveX DLL is loaded and runs within the IIS process space (Inetinfo.exe) on the Web server. When developing components that are invoked through the RDS.Dataspace, you may need to debug these components while they are running under IIS. Do this by compiling the Visual Basic ActiveX DLL with symbolic debug information, then attaching to the IIS process with Visual C++ and debugging the compiled DLL code. This article discusses the specific steps necessary to do this.

↑ Back to the top


More information

Below are steps to set up and debug a compiled Visual Basic ActiveX DLL running under IIS that has been invoked remotely through the RDS.Dataspace object. For additional information on how to create an RDS Custom Business object to use as a test case for the following steps, click the article number below to view the article in the Microsoft Knowledge Base:
166277� Create a VB Component that Returns a Recordset in RDS
  1. First you need to recompile the Visual Basic ActiveX DLL with symbolic debug information. To do this, open the Visual Basic ActiveX DLL project. From the Project menu, select Properties. On the Compile tab, select the box labeled Create Symbolic Debug Info. Recompile the component. You should now see a file with a .pdb extension in the same directory as the DLL. This is the file that contains the symbolic debug information. Make sure this file stays in the same directory as the compiled DLL.
  2. Open Visual C++ 6.0. From the File menu, select Open Workspace. In the Open Workspace dialog box, set Files of Type to All files(*.*), and then select your compiled Visual Basic component.
  3. Again from the File menu select Open and choose the .cls or .bas file that contains the Visual Basic source code you wish to debug.
  4. Create a break point in the code by positioning the cursor on that line and pressing F9.
  5. From the Project menu, select Settings. Click the Debug tab and then Additional DLLs from the Category drop down list. Add your compiled Visual Basic ActiveX DLL to the listing of DLLs.
  6. From the Debug menu, select Start Debug and then Attach to Process. You have to select the Show System Processes box. Once you have done this, select the Inetinfo process and click OK.

    NOTE: If the IIS service is not started, you have to start it before attaching to the process.
  7. Now execute the client code that uses the RDS.Dataspace to invoke your Visual Basic component. Execution should stop at the break point you set inside of the Visual C++ debugger. You can now step through the code inside of the debugger.

↑ Back to the top


References

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
166275� How To Debug a Native Code Visual Basic Component in VC++
193133� How To Compile VB Programs with Debug Symbols Embedded
191741� INFO: RDS Registry/Security Settings For Custom Business Objects
166277� How To Create a VB Component that Returns a Recordset in RDS

↑ Back to the top


Keywords: KB247271, kbhowto

↑ Back to the top

Article Info
Article ID : 247271
Revision : 5
Created on : 7/1/2004
Published on : 7/1/2004
Exists online : False
Views : 371