HOWTO: Debug a Component Written with Visual Basic 5.0
ID: Q172869
|
The information in this article applies to:
-
Microsoft Transaction Server 1.0
-
Microsoft Visual Basic Standard and Enterprise Editions for Windows, version 5.0
-
Microsoft Visual Studio 97
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:
- In a Visual Basic ActiveX DLL project, create your components.
- 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.
- Compile the DLL.
- Add the DLL to an MTS package.
- 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.
- 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.
- 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.
- Using Transaction Server Explorer, select the My Computer icon. On the
Tools menu, click Shutdown Server Processes.
- 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.
Additional query words:
Keywords : kbinterop kbusage kbDebug kbMTS kbMTS100 kbVBp500 kbVS TSrvGen
Version : WINDOWS:5.0,97; winnt:1.0
Platform : WINDOWS winnt
Issue type : kbhowto
|