Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB6,MTS,COM+
Expertise: Intermediate
Jan 15, 2002



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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:\MyComponents\MyModule.dll" you'll see "C:\Program Files\Microsoft Visual Studio\VB98\VB6DEBUG.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.

This tip is taken from the FAQ list that Enrico maintains at his own home page (www.sabbasoft.com/mts_faq.htm).

Enrico Sabbadin
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date