Tuesday, October 21, 2008

asp.net remote debugging

(1) make sure The Remote Debugging Monitor (Msvsmon.exe) is installed on the server,
(2) if not, you can share your local Msvsmon.exe on "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger" folder, and run it from the remote server
(3) make sure dll and pdb files are the same on both local and server ( copy from local if doubt)
(4) attach process from vs, use default transport (not remote transport), and type server name (not ip address), make sure it attach to "managed code" (not "native code")
(5) attach to process w3wp.exe, if multiple process of w3wp.exe exist, use this tool (systemroot\system32\iisapp.vbs) to find out which process match your application pool
(6) put a break point on local and open browser to request server page
(7) debugging ...