How do I run a Java or Visual Basic p-code system service under PureCoverage?

For a system service, you must manually enable the monitoring.

1.    Add PURE_MONITOR_ENABLE=Coverage to your system environment variable. For monitoring Java code, also add MSJAVA_DEBUGGING_FLAGS=3 to disable the JIT compiler and ensure you get line level data. For monitoring Visual Basic 6.0 p-code programs, also add MSVBA_EVENT_MONITORS=1 and VBAEV_COVERAGE=1.

2.    Add the PureCoverage product directory to your system PATH environment variable.

3.    Reboot your machine so the system uses the new values.

4.    For monitoring Java code, verify that the registry key \HKEY_CURRENT_USER\Software\Microsoft\Java VM\EnableEventMonitors is set to 1.

5.    Double-click the Services icon in the Control Panel, select the service you want, and then click Startup.

6.    In the Service dialog box, select Allow Service to Interact with Desktop. (This way, PureCoverage is visible while you run the service.)

7.    Select Manual, and then click OK.

8.    In the Services dialog box, click Start. This launches the service application, which launches PureCoverage, if needed.

9.    When you have finished monitoring, remove the environment variables you added in Step 1, and reset the registry key in Step 4 to 0, if you changed it.

(C) Copyright IBM Corporation 1993, 2010.