RE: How to remotely debug an ASP.NET application?



Hi,

If you're using Visual Studio 2005, please use following steps to test
remote debugging:
0) Install Web Deployment Projects add-in for Visual Studio 2005 on your
develop machine, see [1] for download link; install remote debugging
components on your remote IIS server.
1) Create a new web site in VS2005 using File System mode
2) In Default.aspx.cs: handle Page_Load event, add some code, set a
breakpoint.
3) Publish this web site to your remote server, this will make sure the
remote IIS virtual directory is created correctly.
4) Right-click on your web-site in VS2005, select "Add Web Deployment
Project...", this will create a new WDP project, open its Property Pages,
in "Output Folder", type in the UNC path pointing to the location that the
web site is published to, for example:
\\server\c$\inetpub\wwwroot\TestRemoteDebugging. Make sure "Generate debug
information" is selected, leave other options as default.
5) Right-click on the WDP project, select "Build". This will build your web
site and copy to the server with PDB information generated--which is the
key here to enable remote debugging.
6) "Tools\Options" -> "Debugging\General": uncheck "Enable Just My Code"
7) Make sure remote server is running the remote debugging monitor; Select
"Tools\Attach to process...", select remote process w3wp.exe from your
server (the process that is running under account NETWORK SERVICE)
8) Now, use IE to visit the web page from the remote server, it will take a
while to startup, and it will hit the breakpoint you previously set in step
2.

References:

[1] Visual Studio 2005 Web Deployment Projects
http://msdn2.microsoft.com/en-us/asp.net/aa336619.aspx


Sincerely,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: cannot add user rights assignments on windows server 2003 for user that exists in same workgroup
    ... Have you setup a local account with the same name and password on remote ... Regarding remote debugging, the local debugger's debugging request to the ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.debugging)
  • Re: Remote Debugging Issue
    ... As for the remote debugging ASP.NET issue, ... user account Administrative permission on the remote machine. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SBS Turn-Key Operation
    ... My entire business is primarly mobile, with the chance that an SMB needs ... > then use XP Remote Desktop support a lot easier. ... >> my customers are residental w/ a few SMB accounts. ...
    (microsoft.public.windows.server.sbs)
  • Re: Getting rid of old, obsolete kernels
    ... > to login via terminal server, enter user/password, hard reset the ... LILO and make the system unrecoverable without a boot disk. ... You need a remote serial concentrator to do this effectively. ... Some of the higher end ones support SSH now, ...
    (comp.os.linux.setup)
  • RE: performancecounter object and remote server
    ... you're using the .NET performance counter to open ... counters on remote machine, however, you got the following error, correct? ... running under a local account, has same username/password on both machine). ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.general)

Loading