How To Debug a Visual Basic MTS Component in Visual C++

Article translations Article translations
Article ID: 172869 - View products that this article applies to.
This article was previously published under Q172869
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

You can use Microsoft Developer Studio 97 to debug a Microsoft Transaction Server (MTS) component written in Visual Basic 5.0. This article describes the steps necessary to do this.

MORE INFORMATION

To use Microsoft Developer Studio 97 to debug an MTS component written in Visual Basic 5.0, perform the following steps:

  1. In a Visual Basic ActiveX DLL project, create your components.
  2. On the Project menu, click Properties. Click the Compile tab and make sure that the "Compile to Native Code," "No Optimization," and "Create Symbolic Debug Info" options are all selected. Click OK.
  3. Compile the DLL.
  4. Add the DLL to an MTS package.
  5. Start Developer Studio. On the File menu, click Open Workspace. By default, the Open Workspace dialog box only displays files with a .dsw or .mdp file exension, so you must change the filter so that files ending in .dll are displayed. Select your Visual Basic DLL and then click Open.
  6. On the Project menu, click Settings, and then click the Debug tab. In the Executable For Debug field, type the path to Mtx.exe (for example, c:\mtx\mtx.exe). In the Program Arguments field, type /p:{package_ID}. (You can find the package ID by using the MTS Explorer to open your package's Properties dialog box and then switching to the General tab.) After you have set both fields of the Debug dialog box, click OK.
  7. On the File menu, click Open, and then select the .cls file that is associated with your DLL. Set break points on the lines you want to break on.
  8. Using Transaction Server Explorer, select the My Computer icon. On the Tools menu, click Shutdown Server Processes.
  9. In Developer Studio, press F5 to start the debug session. Call your MTS component from a base client. When the call is made, Developer Studio will halt execution wherever you have set a breakpoint. You can now step forward through the code using F10 or F11, and resume normal execution by pressing F5.

Properties

Article ID: 172869 - Last Review: October 7, 2013 - Revision: 1.1
APPLIES TO
  • Microsoft Transaction Services 1.0
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual C++ 5.0 Professional Edition
Keywords: 
kbnosurvey kbarchive kbbug kbdebug kbhowto KB172869

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com