Click here to Skip to main content
Click here to Skip to main content

Remotely Debugging ASP.Net Web Application

, 10 Dec 2005
Rate this:
Please Sign up or sign in to vote.
Debug our ASP.Net web application Remotely

Introduction: With the help of this article. we can debug our ASP.Net web application remotely. If our target machine has low memory or any problem like web application now work properly on any other machine then local in this case we can use this remote debugging to solve our problem .

Background: For the past few months I have been writing and debugging .NET applications for  the Tablet PC. The Toshiba tablet I have been working with is not the fastest thing in the world and developing with it has been slow. I’ve now taken advantage of my more powerful desktop as my primary development machine and used remote debugging in Visual Studio .NET to run the applications on the target device (the Tablet) while still being able to walk through code on my  PC. It is fairly simple to setup and faster than I had imagined.

Steps For Setup

I used the following MSDN article to get me going and I’ve added a few things to 
streamline the process.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vctskInstallingRemoteDebugMonitor.asp

 

1.      Install Remote Debugging Components on the Target Machine

The target machine that you wish to run the application on while debugging needs to have
the remote debugging software components installed. You can install just the individual
DLLs or just run the Visual Studio .NET installer and only select the “Remote Components
Setup” option (this is how I installed it).

For more info check out the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxurfserversidesetup.asp

2.      Setup Your Visual Studio .NET Project

Open the properties window for your project in Visual Studio .NET. Under the
“Configuration Properties” folder in the “Debugging” set “Debugger Mode” from “Project”
to “Program”. You then need to enter the path and filename on the remote machine where
we will eventually copy the executable in the “Start Application” field, but you will
notice that this is still grayed out. Click on the “Apply” button and this field will be
enabled. For this example we will us the path and filename
“C:\RemoteDebug\RemoteDebugTest.exe”.
Set “Enable Remote Debugging” to TRUE and then enter the WINS name of the remote machine
in the “Remote Debug Machine” field (we will user RemoteXP for the name of our remote PC).
Click OK to save your changes.

3.      Copy The Executable To the Remote Machine

You have to have a copy of the executable on the remote machine
(in the directory we previously specified)
for remote debugging. But it is a big pain to remember to copy it again every time you
rebuild. I used the build events in Visual Studio to help automate this process.
Open the project properties window again and go to the “Build Events” section under
“Common Properties”. Click on the ellipsis in the “Post Build Event Command Line” field
to bring up the command window. Enter the following line:

DEL \\RemoteXP\\C$\RemoteDebug\*.* /Q

This will delete any previous versions of the executable. Hit enter and on the next line
enter:
COPY “$(TargetDir)*.exe” “\\RemoteXP\\C$\RemoteDebug\”

This will copy the application executable to the remote machine.
Click OK twice to save your changes. Now ever time you start the debug process and
the project is automatically built, the new application executable will be copied to
the remote machine. Now press F5! The app will start on the remote machine and you
will be able to step through your code on the local machine.


 

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Your Friend Manoj
Web Developer
India India
B.E I.T
MCP Certified
CCNA Certified
DB2 8.1 IBM
WSAD IBM
ADIT (Advanced Diploma in I.T)
Passing Year of B.E 2005
Interested Field Networking
 
Favourite Word Friend

Comments and Discussions

 
GeneralMy vote of 1 PinmemberPankajKulkarni1-May-09 7:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 11 Dec 2005
Article Copyright 2005 by Your Friend Manoj
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid