About the author

Steven Harmansteven harman :: makes sweet software with computers!

For recent posts and more about me, scroll to the bottom.

Sponsors

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Debugging a .NET WebApp in VS.NET

I've blogged before about debugging dotText in Visual Studio, and recently I've gotten a few emails asking for some help with getting the VS.NET Debugger working. I know that it took some time to get the debugger working correctly with dotText, so I thought I'd put together a little How-To. I'm pretty sure that these instructions will work for most ASP.NET web applications, but I'll be using dotText v0.95 for this Guide. First, a few things that you'll need to have in order for this to work:
  • Visual Studio .NET running on the local machine.
  • The ASP.NET Web server running on and Administrative privileges on the local machine.
  • dotText v0.95 running on the local ASP.NET Web server.
  • To debug the ASP.NET worker process (aspnet_wp.exe or w3wp.exe), you must have permission to debug that process. If the worker process is running as ASPNET (the default), you need Administrator privileges to debug it.
OK... lets get started! First, fire up VS.NET and open your dotText solution. Now do the following:

1. From the Project menu, open the Project Properties of the DottextWeb Project.

2. In the DottextWeb Property Pages window, go to Configuration Properties -> Debugging. Under the Start Actions section, set the Start Page to your dotText installation's default page (default.aspx). Then OK.

3. From the Debug Menu select Start Without Debugging. After the project has been built, a browser window will open to your blog.

4. In VS.NET, from the Debug menu select Processes.... In the Process window, select the aspnet_wp.exe process and click the Attach... button.

5. In the Attach to Process window, check the Common Language Runtime box (this is all you'll need to debug the .NET code). If you also want to debug some SQL Stored Procedures, you'll need to check the Microsoft T-SQL box. OK.

Now all you need to do is set some break-points, and you're good to start stepping through the code! When you're done debugging, just select Stop from the Debug menu.
Hope This Helps!TM

What others are saying.

# Debugging goodness from Steve Harman
Gravatar Dave Burke's Blog
Feb 12, 2005
# re: Debugging a .NET WebApp in VS.NET
Gravatar Dave Burke
Feb 12, 2005
Works great! I posted on it in my blog, adding only that in W2K3 Server I had to click on "Show system processes" for w2wp.exe to appear in the list.

http://dbvt.com/blog/archive/2005/02/12/1240.aspx

Thanks again!
Comments have been closed on this topic.