Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging with Response.Write in classic ASP

Tags:

asp-classic

I am trying to debug some code using Response.Write, but when I run the code it skips over that statement and errors out at some point further in the code.

How can I get my Response.Write statements to show without the other errors coming up?

like image 530
chobo Avatar asked Jan 14 '10 03:01

chobo


People also ask

How do I comment multiple lines in classic ASP?

CommentsEdit Active Server Pages uses the quote character (') to define comments. This comment is a "line comment" meaning that it will comment out everything following it up until the end of the line. There is no multi line comment in ASP. In order to comment multiple lines, each line must be preceded by a quote (').


1 Answers

We utilize Visual Studio 2008 to debug classic asp pages. You can attach to the IIS process and "step through" the page. Its very sweet. Here are the steps:

  1. Get latest of the classic ASP from source control.

  2. Install IIS (if not already). FYI... I am using IIS 5.1.

  3. Create a virtual directory called "classicDebug" pointing to your local directory (C:\Websites\ClassicWebSite).

  4. View the virtual directory properties, Virtual Directory tab.

  5. Enable the "Script source access" checkbox.

  6. Configuration button, Options tab - check everything.

  7. Debugging tab - check everything.

    7a. In the ASP.NET tab, select 2.x

  8. Load up (not run or debug or F5) the website in VS.NET 2008.

  9. Edit your global.asa accordingly (data sources, and paths).

  10. Find the .asp page you want to "step through" and set a break point at the top (or somewhere).

  11. Open IE, and navigate to your page.

  12. Go back to VS.NET and select Debug -> Attach to Process

  13. Check "show processes from all users" and select the process. For me (IIS 5.1), the process name is dllhost.exe running with the IWAM_COMPUTERNAME account w/type "Script, T-SQL, Managed, x86".

  14. Visit your page using IE... VS.NET should break.

like image 162
Kris Krause Avatar answered Oct 25 '22 10:10

Kris Krause