a developer's notes – a semi-technical web development BLOG

September 5, 2011

Debugging into Classic ASP with Visual Studio

Filed under: Classic ASP — Duy Nguyen @ 2:22 pm
Tags: , , , , ,

1. First, navigate to the page your trying to debug into to load the IIS Worker Process.

2. Enable “Script source access” in IIS under the Home Directory tab. This allows VS to access the script files in ASP

3. In the Home Directory tab, click Configuration under application settings. Then click the Debugging tab. Check the box for Enable ASP server-side script debugging.

4. In Visual Studio, you need to enable Just-In-Time debugging for script files. In VS2008 go to Tools -> Options. Navigate to Debugging -> Just-In-Time. Click the check box to enable scrip debugging:

5. Add a “stop” statement to your VB code where you want the JIT debugger to break execution.

6. Finally, use the attach to process feature. In the Debug menu in VS2008. Ensure that “Attach to:” has “Script” selected and that your w3wp.exe has “Script” as one of the Types. If “Script” is not listed in the types, you have not configured IIS correctly for debugging.

7. You should now be able to navigate to the page you are trying to access. The debugger should load when the stop statement is reached and you can use the Debugging controls inside Visual Studio.

Advertisements

How to use Microsoft’s DebugView with ASP.NET for debugging

Filed under: General Tips — Duy Nguyen @ 2:17 pm
Tags: , , , , ,

This is a great article.

UPDATE: But this doesn’t seem to work with .NET 4 web apps. Only 3.5 or less.

http://www.dotnetcurry.com/ShowArticle.aspx?ID=337

Create a free website or blog at WordPress.com.