Article ID: 120707 - Last Review: July 1, 2004 - Revision: 2.1 How To Debug an Active Process in 32-bit Visual C++
This article was previously published under Q120707 SUMMARY
You can debug an active process with 32-bit editions of Microsoft Visual C++. You can attach to the active process by starting Visual C++
using the undocumented -p switch, followed by the process identification
number (PID).
MORE INFORMATION
To obtain the PID for the process to be debugged, use the process
viewer (PVIEW.EXE). Start PView. You will see something like this:
Process CPU Time Privileged User MyApp(0xb7) ... Assume that the process was built with debugging information. Start Visual C++ version 2.x as follows: MSVC -p 0xb7 MSDEV -p 0xb7 NOTE: When you stop debugging the application, the application will be terminated. This is expected behavior. The procedure on Windows 95 is a little different with Visual C++ 2.0 through 4.0 (Visual C++ 4.1 and later handle the Windows 95 PID without conversion). The Windows 95 PIDs are negative signed decimals when converted from hexadecimal. You need to make sure the PID has a minus sign in front of it. For instance, if the PID of the process you want to attach to is FFFE64C3, you can use this method with calculator to get the PID: Hex PID -> [Not] -> (DEC) -> [Not] -> Dec PID
Invalid Parameter (Win32, Error 87)
APPLIES TO
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

Back to the top