Tips for debugging MTS components in the VB IDE

Tips for debugging MTS components in the VB IDE

It was and it is still easy to debug MTS components written on Visual C++ version 5 and higher. Debugging components written on Visual Basic 5 is possible under VC IDE. Starting with version 6, Visual Basic allows to debug under its own IDE. Here are the things you should keep in mind while preparing to debug session:

1) Set appropriate timeouts. If you’re going to drill your code down thoroughly it is almost obvious that you’ll need longer timeouts on connection pooling and package idle time.

2) Package of the component must be shut down before debug session, i.e. before pressing F5 button don’t forget to do “Shut Down” action on the package from “Transaction Server Explorer.”

3) Debugging VB5 components in VC IDE sometimes is almost worthless because of bad variables visibility.

4) Debugging VB6 components is possible only with WinNT4 Service Pack 4 installed and is not possible on Windows 9x platform. The proper settings for the software and other issues are well described in VB6 Readme file (READMEVB.HTM).

5) It’s better to debug VB6 components having them removed from MTS environment, otherwise you’ll need to reinstall the components in MTS (when debugging, VB6 replaces registration information of the component and, for example, instead of “C:MyComponentsMyModule.dll” you’ll see “C:Program FilesMicrosoft Visual StudioVB98VB6DEBUG.DLL” registered under MTS).

6) “Stateless component remains activated after a call” issue. When debugging MTS components under VB IDE an MTS component might be shown as “activated” in MTS Explorer even if you’re sure that this component is stateless (i.e. you call SetComplete or SetAbort during each method call). It is neither an MTS glitch nor a developer’s mistake. This happens because of VB IDE. During debugging (especially in step by step mode) VB calls some interfaces of the component. Also, if by any reason you decided to put the component in the watch window, don’t be surprised as well.

See also  Does It Make Sense to Splurge on a Laptop?

This tip is taken from the FAQ list that Enrico maintains at his own home page (


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist