Can't debug ASP in VS2005
Thanks
Jeremy
Thanks
Jeremy
ddk
They can't surely, seriously, have removed debugging support for ASP?
See this:
http://forums.asp.net/906347/ShowPost.aspx
Seems they plan to fix it. I sure hope they do, it would be a serious limitation if it continues to be missing.
We have made the decision in Whidbey not to explicitly support ASP debugging anymore. This is because we expect more and more customers to swithch to ASP.NET. However, actual support is not totally cut, it's just not that obvious. In order to be able to debug ASP sever side script you have to:
1. Enable script debugging for you app's virtual directory in IIS manager (In the Property dialog for your v-dir, go to the Directory tab, click on Configuration, go to the Debugging tab and check both debugging flags the reset IIS to apply the change)
2. Then load your ASP page in IE and attach the Whidbey debugger to the ASP worker process (dllhost.exe in IIS4 and 5 and w3wp.exe in IIS6) selecting Script as the type.
3. Now you can debug your ASP sript as before (you might have to open the page from the Debug | Windows | Script documents window).
This being said, if for some reason ASP debugging doesn't work or you find some bugs related to it, it's because we don't explicitly support it anymore hence we didn't focus on making sure that this is at a high quality level.
Hope this helps,
Monica
![]()
Monica, thanks, but you've got to be kidding me. Do you realise how much extra time those steps would add to the development/test/debug cycle.
How can you possibly expect people to migrate to .Net so quickly. Our application has 1m lines of C++ source and 1,500 ASP page, and thousands of customers - many who refuse to install the .Net framework, including many Fortune 100 companies.
Do you seriously expect me to migrate this code base overnight?
Jeremy
Thanks for the info. I am using the "Visual Web Developer 2005 Express" flavor of VS2005. It doesn't look like the "attach to process" feature is present. Is that correct?
If so, is there another way to enable legacy ASP debugging? I realize that this goes against the intent behind this tool, but the fact of the matter is that while I'm taking on more and more .NET projects, I'll be stuck w/ legacy ASP maintenence for quite some time and it'd be nice to use one tool to does both. I imagine that I'm not alone.
Anyone?
I agree it is appalling there is no support for legacy ASP in Visual Studio 2005. I have bought the release version and I am currently converting our application. Unfortunately much of the ASP code has been inherited, uses very dodgy techniques to submit the form data and is virtually impossible to maintain without access to an online debugger. It was my hope to support it using Visual Studio 2005 while migrating our code to .NET. I have tried to attach to the w3wp.exe process; I can see the running scripts in the debug script explorer but cannot get them to break into the debugger. I would appreciate help if anybody has actually achieved hitting a breakpoint in ASP code. Otherwise I will have to ask Microsoft for a refund!
Thanks
It seems to me that Microsoft have been very focused on making the transition to .net as smooth as possible.
But taking out a functionality like this goes a very long way in the opposite direction. The transition will take years extra, because every developer supporting classic .asp code will have to stick to the 2003 version of visual studio.
Someone has made a big mistake here, and the only sensible thing to do, is make an update that enable debugging classic .asp code, and get it out as soon as possible.
Can anybody please explain to me what this Monica's step means. I didn't understand it
"2. Then load your ASP page in IE and attach the Whidbey debugger to the ASP worker process (dllhost.exe in IIS4 and 5 and w3wp.exe in IIS6) selecting Script as the type."
Does she mean IDE instead of IE? I tried to include asp pages in the project but VS2005 refuses to debug them. Thanks
.
No, she meant IE. Can you clarify what you mean by 'refuse to debug them'. Do you see your ASP documents in the Script Explorer window?
As for the many requests to bring back auto-attach support for ASP debugging, what are people looking for:
Case #2 and #3 are pretty hard to solve. On the other hand, Monica's work around should enable #1. Of course manually attaching to a process takes more time and thought than just hitting F5. One solution to this might be to use a macro like this one:
Sub ClassicASPAttach()
Try
Dim os As System.Version = System.Environment.OSVersion.Version
Dim IISProcess As String = "w3wp.exe"
If os.Major = 5 And os.Minor <= 2 Then
IISProcess = "dllhost.exe"
End If
Dim process As EnvDTE80.Process2
For Each process In DTE.Debugger.LocalProcesses
Dim processName As String = process.Name.ToLowerInvariant()
If System.IO.Path.GetFileName(processName) = IISProcess Then
process.Attach2("Script")
End If
Next
Catch ex As System.Exception
MsgBox(ex.Message)
End Try
End Sub
You can assign a macro to a key so that it is almost as easy as hitting F5.
I hope this helps.