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