Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Classic ASP Language SupportNew to Visual Studio Code? Get it now.
Classic ASP Language Support

Classic ASP Language Support

ashtonckj

|
1,542 installs
| (2) | Free
| Sponsor
Classic ASP & VBScript: formatter, IntelliSense, Go to Definition, Rename, error checking and syntax highlighting. For VS Code, and editors that install from Open VSX.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Classic ASP Language Support logo
Classic ASP Language Support

Format, navigate and error-check Classic ASP and VBScript, with your #include files understood.

VS Marketplace version Open VSX version Installs, VS Code Marketplace and Open VSX together License: MIT

Format Document tidying a messy Classic ASP page, IntelliSense listing Recordset members, a hover and Ctrl+Click into a function in an #include file, F2 renaming a variable everywhere, and the same page in four colour themes
Dark Modern, Light Modern, Monokai and Catppuccin

What it does

  • Formats the whole page in one go. VBScript, HTML, CSS, JavaScript and the SQL in your strings, with the keyword casing you choose.
  • Follows your includes. Go to Definition, Find All References and Rename work across #include files, and moving a file offers to fix every include that pointed at it.
  • Finds mistakes before IIS does. An If without End If, a missing Set, an include that doesn't exist, an undeclared name under Option Explicit and a call with the wrong number of arguments.
  • Knows your objects. After Set rs = Server.CreateObject("ADODB.Recordset"), typing rs. lists its methods and properties; hover explains Response, vbCrLf, Mid and your own Subs.
  • Colours it properly. ASP blocks get a tint, SQL inside strings is coloured as SQL, and your own variables, functions and Subs as what they are.
  • Helps in every part of the page. HTML, CSS and JavaScript get their own completion, hover and checks, and none of them fire inside your VBScript.

✨ Getting started

  1. Install it from the VS Code Marketplace, or in VSCodium, Cursor and other editors that use Open VSX: search for Classic ASP Language Support in the Extensions view.
  2. Open your site's folder and any .asp, .inc or .asa file.
  3. Press Alt + Shift + F (Option + Shift + F on a Mac) to format it.

If the folder you open is not your IIS application's root, set classicAsp.virtualRoot to the root, so #include virtual="/…" and links like href="/css/site.css" are found.

Do this Press
Format the page / the selected lines Alt + Shift + F / Ctrl + K Ctrl + F
Go to a definition, even in an include F12 or Ctrl + Click
Rename a variable, Sub or Function everywhere F2
Find every use Shift + F12
Find a Sub or Function in the workspace Ctrl + T
Insert a snippet type its prefix (rsloop, dbconn, rw, inc …), then Tab

To see what Format Document would change before it does, run Classic ASP: Preview Formatting from the Command Palette.

⚙️ Settings you might change

Setting Default
classicAsp.keywordCase PascalCase How keywords and built-in functions are written: PascalCase, UPPERCASE or lowercase
classicAsp.virtualRoot (the open folder) Your IIS application root, for #include virtual and root-relative links
classicAsp.prettier.printWidth 80 Where HTML, CSS and JavaScript lines wrap

The rest are under Settings → Extensions → Classic ASP.

Why won't it format?

Format Document leaves a page alone, and says why, when formatting could break it:

  • Tags or blocks don't pair up. An If with no End If, a <div> never closed, a <% with no %>. The message names the first one and its line; Go to Issue takes you there. Fix it and format again.
  • Prettier can't read the HTML. The message gives the line in your page; Go to Line takes you there, and Show Details shows Prettier's own error.
  • The page is JScript (<%@ Language="JScript" %>). The formatter knows VBScript only, so it leaves the page as it is.

When formatting runs on save, it says nothing and just saves.

Silencing a warning

If a warning is wrong for your page, press Ctrl + . on it and choose Ignore on this line or Ignore in this file. That writes a comment the extension reads:

<%
' asp-ignore-next-line missing-set
rs = GetRecordset()
%>
<!-- asp-ignore-next-line html-tag -->
<div class="opened-in-header-include">

asp-ignore-file silences a code for the whole page; with no code, it silences everything. The comment travels with the file, so everyone who opens it sees the same. A structure warning you silence still stops Format Document, because the page still can't be formatted safely.

Replacing another Classic ASP extension

This extension includes syntax highlighting and snippets, so it replaces Classic ASP Syntaxes and Snippets and ASP Classic Support. Two extensions that read the same .asp files fight over colours and completions, so when it finds one it offers to uninstall it, or to open it in the Extensions view so you can disable it. Your files are not touched.

editor.linkedEditing does what Auto Rename Tag did, ASP between the tags or not. Error Lens and Indent Rainbow work well alongside it.


📋 Known limitations

  • Formatting is refused while tags or blocks don't pair up (see above). A page that opens a <div> in one include and closes it in another can't be formatted.
  • #include virtual needs the right root. It resolves from classicAsp.virtualRoot, or the open folder when that is empty.
  • A <%= %> that writes a tag inside an onclick="…" can colour the rest of the line wrongly. VS Code's HTML grammar owns attribute values; the page still runs correctly.

Links

Changelog · Report a bug or ask for a feature · Contributing · Open VSX

Prettier
Prettier
formats the HTML, CSS and JavaScript
Classic ASP Syntaxes and Snippets
Classic ASP Syntaxes and Snippets
by Jintae Joo
ASP Classic Support
ASP Classic Support
by Zachary Becknell

No need to install these alongside, as running two Classic ASP extensions makes them fight over colours.

Built on Prettier and the TypeScript, HTML and CSS language services. Region highlighting started from Zachary Becknell's ASP Classic Support, and the snippets ideas were taken from Jintae Joo's Classic ASP Syntaxes and Snippets.


If it saves you time, a ⭐ on GitHub or a rating on the Marketplace helps others find it.
Made with ❤️ for the Classic ASP community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft