5,665,355 members and growing! (15,121 online)
Email Password   helpLost your password?
Development Lifecycle » Debug Tips » Tips     Beginner License: The Code Project Open License (CPOL)

Debugging Classic ASP ( VBScript ) in Visual Studio 2008

By Rock Webcast

Step by step, how to set your project up so you can debug a site written in Classic ASP VBScript using Visual Studio 2008.
VBScript, Visual Studio (VS2005, VS2008, Visual Studio), Dev

Posted: 23 Aug 2008
Updated: 23 Aug 2008
Views: 6,021
Bookmarked: 8 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
3 votes for this Article.
Popularity: 1.43 Rating: 3.00 out of 5
1 vote, 33.3%
1
0 votes, 0.0%
2
1 vote, 33.3%
3
0 votes, 0.0%
4
1 vote, 33.3%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

Step by step, how to set your project up so you can debug a site written in Classic ASP VBScript using Visual Studio 2008.

Using the code

I walk you step by step through how to set your project up so you can debug a site written in Classic ASP VBScript using Visual Studio 2008.

1.1 Setup IIS


1.1.1 Configure Default IIS web site on local machine to point to the directory the Classic ASP web site is in and turn on ASP server side debugging.
iis-enable-asp-server-side-debugging.gif

1.2 Setup Project in Visual Studio 2008

Since we're talking "classic ASP" written in VB Script you'll already have a web site so I'll cover opening an existing site.

1.2.1 Launch Visual Studio 2008
1.2.2 File >> Open >> Web Site
1.2.3 Navigate to the directory that contains the ancient code you have to work with, select it and it opens.
1.2.4 Right click the web site in Solution Explorer.
1.2.5 Go to Properties >> Start Options
1.2.6 Configure it to use custom server with Base URL of http://localhost
vs2008-start-options.gif

1.3 Start Debugger

1.3.1 Run application (F5)
1.3.2 Select Visual Studio 2008 as your debugger of choice.
1.3.3 Attach to dllhost.exe.
attach-to-dllhost.gif
1.3.4 Your browser launches.
1.3.5 A new instance of Visual Studio launches.
1.3.6 Close the new instance of Visual Studio but leave the browser open.
1.3.7 In the instance of Visual Studio that you opened the web site in click Debug >> Attach to Process.
1.3.8 Check Show process from all users.
1.3.9 Select entry for dllhost.exe with type Script, T-SQL, x86
1.3.10 Click Attach
debug-attach-to-process.gif
1.3.11 Just to make sure things are in working order set a break point at the beginning of your code and click refresh on the browser that was launched when you clicked F5.
1.3.12 Send me a nice thank you.

1.4 Restart Debugging Browser

You will need to reattach to the debugger process if you close the browser.
1.4.1 Hit F5 to launch a new browser window with your application in it. If it acknowledges your breakpoints then never mind, you're already in business. If not then....
1.4.2 With the browser window still open back in Visual Studio simply click Debug and then Attach to Process in the drop down menu.
1.4.3 Select entry for dllhost.exe with type Script, T-SQL, x86
1.4.4 Click Attach.
1.4.5 Click refresh in the browser F5 launch and Bob's your uncle you're back in business.

Points of Interest

Did you learn anything interesting/fun/annoying while writing the code? Did you do anything particularly clever or wild or zany?

History

Keep a running update of any changes or improvements you've made here.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Rock Webcast



Location: United States United States

Other popular Debug Tips articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 5 of 5 (Total in Forum: 5) (Refresh)FirstPrevNext
GeneralImprovements in Visual Studio 2008memberMikeGale22:47 18 Oct '08  
GeneralNeed to do it slightly different under Server 2008.memberMember 116013610:17 19 Sep '08  
GeneralThis doesn't work on some OSmemberMikeGale17:40 8 Sep '08  
GeneralRe: This doesn't work on some OSmemberMember 21348177:19 17 Oct '08  
GeneralDebugging on Vistamembertvlep12:24 26 Aug '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 23 Aug 2008
Editor:
Copyright 2008 by Rock Webcast
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project