Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
334 views
in Technique[技术] by (71.8m points)

has anybody been able to debug asp classic code with visual studio 2005 or later?

I've been stuck with visual studio 2003 for ages because of my need to debug asp classic code...

A few years ago I tried to debug classic asp with vs 2005 with no luck, I think there was some dirty hack that was supposed to achieve that "magic", but I couldn't make it work...

I wonder if anybody has been luckier than me...

Haven't tried yet with vs 2008, but I'm not very confident on that, due to the lack of support to classic asp from microsoft...

--

edit:

oops!, just found the following question

Does Visual Studio 2008 support classic ASP development?

so it seems like visual studio 2008 really supports classic asp debugging...

I'll leave the question open for a couple of days, just in case someones wants to add some tutorial, comment or anything interesting...

-- edit:

some links

the dirty visual studio 2005 hack I was talking about:

http://blogs.msdn.com/greggm/archive/2006/03/15/552108.aspx

a few links explaining how to debug classic asp with visual studio 2008, couldn't try any of them yet...

http://www.codeproject.com/KB/debug/DebugVBScriptVS2008.aspx

http://codepagoda.com/2009/04/30/debugging-classic-asp-with-visual-studio-2008-sp1-and-35-framework/

http://bytes.com/groups/asp/836751-better-debugging-classic-asp-visual-studio-2008-sp1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have debugged Classic ASP in Visual Studio 2005. Also, Visual Studio 2008 was supposed to make it better, but I never had a chance to try or to find out the details.

Your biggest problem is that Visual Studio 2005 took away the ability to "Start With Debug" an ASP application.

In VS 2005, Microsoft completely changed the way the debugger connected to IIS. The old way (for both ASP and ASP.NET) which was used by everything from InterDev (remember InterDev?) through VS 2003 was orchestrated via the "Machine Debug Manager", a sort of intermediary helper service. The whole thing was... arcane, trying to solve a complex problem that was made harder by the fact that IIS and Visual Studio run under separate accounts and in some cases, different machines. This was a very delicate process that was very prone to break at the slightest configuration change.

Every single one of my machines stopped being able to debug Classic ASP at some point or another for reasons that appeared related to the alignment of the stars. I used to have at hand a 14 page checklist printout that described the whole "incantation", jumping from IIS Manager to Visual Studio to User Account Manager, to COM+ Explorer... and even that didn't always work. It makes me shiver just thinking about it.

Ultimately, they gave up. In Visual Studio 2005, Microsoft came up with a different architecture for debugging IIS applications (sorry; I don't know how it works now). At the time, MS decided that not enough people were using ASP anymore, and prioritized other work on top of it. Enabling ASP debugging through the new architecture was a significant amount of work especially for a technology on its way out, so it got chopped. I don't blame them; they made a sound business decision. Would you rather have no ASP debugging in VS 2005? Or yes ASP debugging on VS "2006"?

Anyway, not all is lost.

First, you can't "launch" the debugger with F5 anymore, but you can still attach manually to an already running ASP process and it will work, as long as you enable debugging in IIS Manager by hand. The experience in Visual Studio 2005 is sometimes better, sometimes worse than under older versions. It's certainly more stable and very much doable. More details below.

Second, I heard at some point that Visual Studio 2008 was supposed to make a come back and get ASP debugging back in the product, or at least bring some improvement, or some such -- I could never quite get a clear picture. Then I lost track of the whole thing because by some miracle I've kept myself out of dealing much with ASP projects for a few years now.

I'll try to find more references on VS 2008 and classic ASP. If I find something, I'll edit this post with it (sorry -- it might take me a few days to get to it).

More details can be found in these posts:

Full instructions on how to debug by manual attaching in this Gregg Miskelly post: Debugging Classic ASP Code

Other related information can be found here and at other Mikhail Arkhipov posts.

Hope this helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...