Go to AVS Home Page
 Recent Releases
OpenViz 2.9 Released
AVS/Express 7.2.2 Released
Toolmaster 7.5.3 Released
AVS 5.7 Released
 Contact Support
 Licensing
Information on licensing AVS 
products
 
Interact with the AVS Developer 
community. Takes you out of 
the support web site

 


Q. How do I debug a module in the user process on the PC?

A. Debugging the user process on the PC is similar to debugging under UNIX in that, in both cases, you must attach to a running process.

You attach to the process using its process ID or PID. Once the user process is running, you can determine its PID under NT V4 or V5, by doing the following:

  1. Call up the task manager by right mouse clicking on the taskbar, and then selecting task manager.
  2. Select the "Processes" tab in the task manager
  3. Locate the PID of the task you are interested in debugging (the user process)

BE CAREFUL because there is a windows NT process which is also called USER.EXE. Make sure you select the correct user.exe.

Under Windows '95, you can use Spy++ to find the PID:

  1. Bring up Spy++ from Start_Menu->Programs->Microsoft_Visual_C++_6.0.
  2. Select the menu item Spy->Processes..
  3. A window containing a list of processes, including the PIDs, appears. Note that the PIDs are high numbers on Win95.

Invoke the Visual C++ debugger, MSDEV, and specify the PID determined above as an option. Run:

MSDEV -p <PID> 

This command can be run from either a command shell, or from the Desktop: Start->Run.

The "msdev -p PID" feature has been available from MSDEV v4.0. This means that users can do this with AVS/Express.

On older systems (prior to NT 4.0), you can user other methods to determine a process's PID, such as PSTAT (ships on NT 3.51 as well). The PID is the number just preceeeding the process name. For example,

E:\avs\express> msdev\bin\winnt\pstat.exe | grep "user.exe" 
0:00:00.420 0:00:00.550 2624 753 1032 8 47 2 248 user.exe 
pid: f8 pri: 8 Hnd: 47 Pf: 753 Ws: 2624K user.exe

In this case, 248 is the process id for user.exe.

You use this as the value following the "-p" switch on the msdev commandline.