Tuesday, September 6, 2011

Remote Debugging in Asp.net

Sometime we need to debug on client machine, in order to do it in a better way we have remote debugging option available. We can do remote debugging by following some simple steps listed below:

1. Run the Visual Studio Remote Debugging monitor tool on server machine i.e msvsmon.exe. It is present at C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86. The Remote Debugging tool (Msvsmon.exe) is a small windows based application that Visual Studio uses for remote debugging. After launching this you will see the following screen:


remote8.jpg

Configure Authentication Mode

Configuration of msvsmon tool is very easy. The main configuration is involves with the authentication mode. Msvsmon support two types of authentication

  • Windows Authentication
  • No-Authentication
Windows authentication is a secure mode, in which u can enable specific set of users to connect to remote debugging server,
There is no security involved with no-authentication mode. Any one can debug remotely, if the authentication mode is set to "No-Authentication". As this debugging mode is not at all secure, so it should be used only on secure network.

2. Install the Remote debugger on server. Lets assume we have a visual studio 2010 application deployed on server, in that case, we will install Visual Studio 2010 Debugger i.e. Available Here

3. Attache Process from client machine i.e your local machine by going through Tools->Attach Process and link with the remote debugger process (w3wp.exe). If you have more than one application pool, you can figure out your application pool by using following command:

cscript iisapp.vbs (IIS 6)


for IIS-7 , use the following command
appcmd list wps (C:\Windows\system32\inetsrv\)

Happy Remote Debugging......... :)

1 comment:

  1. It does not work....

    Please help, if some step is missing in the above post...

    ReplyDelete

Earn Money ! Affiliate Program
Open Directory Project at dmoz.org