4.5.3 Starting a Debugging Session for Multiple Instances of an Application

Windows can run multiple instances of an application simultaneously, which can cause a problem for your application. For example, two instances of an application might interfere with each other, or one application might corrupt the data of the other.

To help you solve problems associated with running multiple instances of an application, CVW allows you to debug multiple instances of an application at the same time. You can determine which instance of an application you are looking at by examining the DS register at any breakpoint.

To debug multiple instances of an application, perform the following steps:

1.Start CVW as usual for your application.

2.Run one or more additional instances of your application by choosing Run from the Program Manager File menu.

Specifying your application name more than once when starting CVW does not have the effect of loading multiple instances of the application.

The breakpoints you set in your application apply to all instances of the application. To determine which instance of the application has the current focus in CVW, examine the DS register.