Profiling a VB Add-In with TrueTime TrueCoverage version 6.x

0 Likes

Problem:

Is it possible to Profile a VB Add-In with TrueTime / TrueCoverage version 6.X

Resolution:

TrueTime and TrueCoverage are designed to not collect timing or coverage data when a DLL (or Active-X) control is hosted by VB or MSDEV. This is so that a control sitting on a form at design time does not collect data.

It is possible to profile Visual Basic Add-Ins with TrueTime and TrueCoverage. This can be accomplished in one of two ways.

- You could recompile your VB Add-In as an ActiveX EXE.

Here are the basic steps to do so:


  1. If the .DLL for the Add-In has already been compiled and registered, unregister the .DLL with the RUN line in windows. (Windows-Key 'R'):

    Type "regsvr32 -u [path and file name]" to unregister.

  2. Open the project in the Visual Basic IDE
  3. Under "Project|Properties" select "ActiveX EXE" as the project type.
  4. Under the DevPartner menu, click "Make with TrueTime" or "Make with TrueCoverage"

- OR -

- By setting an environment variable

There is an undocumented way around this behavior. This has not been formally tested and should be considered "use at your own risk".


  1. In a command window, set an environment variable NM_ALWAYS_START=1 and then load VB from there.
Old KB# 11074
Comment List
Anonymous
Related Discussions
Recommended