With Visual Studio 2005, 2008, and 2010 you can debug Classic ASP by attaching the debugger to the w3wp.exe process. This is very buggy and crashes often in 2005 and 2008, but works well in 2010. The only problem is that, as far as I can tell, VS2010 does not support Classic ASP code highlighting or code completion. HTML looks fine, but any Classic ASP code is just plain black-on-white.
I can’t add <%@Script="VBScript"%> to the top of each page because of the site architecture, and even after testing that – it doesn’t do anything.
This whole issue is highly confusing because with Visual Studio 2010 Express, the aforementioned Classic ASP support comes out of the box (minus debugging).
I can get alternating HTML and VBScript highlighting by switching between the following modes (but never both). I have tried the following: Tools > Options > Text Editor > File Extensions > Adding an “ASP” extension with the following Editors:
- Automatic Editor Selector (XML) – gets the HTML right, but no dice on
the ASP - Microsoft Visual Basic – gets the ASP mostly right (lots of
underlined errors even though code is up to ASP standard), but no
HTML highlighting - Script Editor – HTML but no ASP
- Web Form Editor – HTML but no ASP
I have considered extending the Editor, my thoughts being to try and mix the markup for the Web Form Editor and the Microsoft Visual Basic editor, but am unsure if this is a reasonable course of action.
How can I get code highlighting and intellisense for Classic ASP in Visual Studio 2010?
Solved!
TL;dr: Install Service Pack 1
Walk you through the troubleshooting process:
issue. Same problems as before.
(http://www.microsoft.com/download/en/confirmation.aspx?id=23691).
perfectly. Debugging worked flawlessly as well.
away.