Setting up Visual Studio Code for VScript

From Valve Developer Community
Jump to: navigation, search
English (en)Translate (Translate)

This page describes how to set-up Visual Studio Code Visual Studio Code for VScript purposes.

Usage

Squirrel Squirrel

Click on the Extensions button in VSCode. This is represented as a icon of building blocks, usually on the left side of the window.

Search for "Squirrel" in the search bar. Install the following extensions:

  • Squirrel Language Supports (by marcinbar)
  • Squirrel Language Linter (by marcinbar)
Warning.pngWarning:The Linter extension clogs up the Wikipedia icon temporary folder of your operating system. You can fix this by replacing the uuid.v4() function with a static folder name inside the %extensionfolder%/marcinbar.vscode-squirrel-linter-%version%-universal/node_modules/temp-write/index.js file, where %extensionfolder% is your VSCode's extensions folder and %version% is the version of the extension.

Restart VSCode. Now the language is ready for use in the editor!

Autocomplete

For Team Fortress 2 Team Fortress 2, auto-completion of the game's built-in script functions and constants is also available.

Click on the Extensions button in VSCode. This is represented as a icon of building blocks, usually on the left side of the window.

Search for "VScript" in the search bar. Install the following extension:

  • TF2 VScript Snippets (by Sour Dani)

Restart VSCode. Functions and constants should now autocomplete!

Debugger

Demonstration of the debugger

This allows you to create breakpoints, step line by line, and view the state of all variables during each step. Download the extension from here.

See also