You will need two things:

  • tasks.json file
  • Blade Runner extension for VS CODE

Start by creating .vscode folder in your project.

Then in it create tasks.json file with the following content:

{
    "version": "0.1.0",
    "command": "sass",
    "isShellCommand": true,
    "args": ["--watch", "."],
    "showOutput": "always"
}

Now, after opening the project you can run the task by clicking Ctrl+Shift+B.

To automate the process use Blade Runner extension - https://marketplace.visualstudio.com/items?itemName=yukidoi.blade-runner

Blade Runner will run the task automatically after opening the project :)

Answer from gabrieln on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › css
CSS, SCSS and Less
November 3, 2021 - There are many other Gulp Sass and Less plug-ins you can use, as well as plug-ins for Grunt. You can test that your gulp installation was successful by typing gulp -v in the terminal. You should see a version displayed for both the global (CLI) and local installations. Open VS Code on the same folder from before (contains styles.scss/styles.less and tasks.json under the .vscode folder), and create gulpfile.js at the root.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Live Sass Compiler - Visual Studio Marketplace
Extension for Visual Studio Code - Compile Sass or Scss to CSS at realtime with live browser reload.
Top answer
1 of 5
9

You will need two things:

  • tasks.json file
  • Blade Runner extension for VS CODE

Start by creating .vscode folder in your project.

Then in it create tasks.json file with the following content:

{
    "version": "0.1.0",
    "command": "sass",
    "isShellCommand": true,
    "args": ["--watch", "."],
    "showOutput": "always"
}

Now, after opening the project you can run the task by clicking Ctrl+Shift+B.

To automate the process use Blade Runner extension - https://marketplace.visualstudio.com/items?itemName=yukidoi.blade-runner

Blade Runner will run the task automatically after opening the project :)

2 of 5
4

A solution without additional extensions

With sass

Assuming you have sass installed globally with for instance:

npm install -g sass

Open the folder and create a task.json file under .vscode containing

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "Watch Sass",
        "type": "shell",
        "command": "sass --watch src/style.sass styles/style.css --style=compressed",
        "problemMatcher": [],
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "runOptions": {
            "runOn": "folderOpen"
        }
    }]
}

With node-sass

Replace sass with node-sass in the above.

In both cases make sure the source/destination filename, location and extension are correct (in my case src/style.scss and style/style.css)

With a Workspace file

Or copy the section in your .vscode-workspace file to avoid clutter of .json files.

Make sure to change the sass source and destination files to your personal needs.

Setup VSCode

[EDIT] whith the current version this is asked the first time you open the workspace file and the following steps are no longer needed. To a llow automatic run tasks

  1. Ctrl+Shift+P
  2. select Manage automatic Tasks and
  3. select Allow Automatic Tasks in Folder and
  4. close and reopen your folder (or Workspace)

The sass compiler will be called and starts watching all your edits with a reassuring:

Compiled css\src\style.sass to css\style.css.
Sass is watching for changes. Press Ctrl-C to stop.

or with error messages when compilation failed.:

Error: semicolons aren't allowed in the indented syntax.
  ╷
7 │     padding: 0;
  │               ^
  ╵
  css\src\_base.sass 7:12  @import
  css\src\style.sass 1:9   root stylesheet

EDIT command and args can be separated

{
    "label": "Compile sass",
    "type": "shell",
    "command": "sass",
    "args": [
        "--watch",
        "--style=compressed",
        "./style/src/main.sass",
        "./style/main.css"
    ],
    "runOptions": {
        "runOn": "folderOpen"
    }
},
🌐
Medium
medium.com › @codingcarter › how-to-compile-scss-code-in-visual-studio-code-c8406fe54a18
How to Compile SCSS Code in Visual Studio Code | by Coding Carter | Medium
January 24, 2020 - Look at the bottom right of the Visual Studio Code interface, and you should see a button that says “Watch Sass”. Click the button, and the extension will generate a {filename}.css and {filename}.map.css file in the directory of all .scss ...
🌐
Bangtech
data.bangtech.com › web › how-to-compile-your-sass-to-css-in-visual-studio-code.htm
How To Compile Your SASS/SCSS To CSS In Visual Studio Code
[ { "outputFile": "wwwroot/css/style.css", "inputFile": "wwwroot/css/style.scss" },{ "outputFile": "wwwroot/css/menu.css", "inputFile": "wwwroot/css/menu.scss" } ] Compile Sass Files in Visual Studio 2019 Using Web Compiler
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
scss-to-css - Visual Studio Marketplace
Extension for Visual Studio Code - 🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.
🌐
GitHub
github.com › ramya-rao-a › vscode-sasshelper
GitHub - ramya-rao-a/vscode-sasshelper: VSCode extension that helps converting css to scss and to use mixins · GitHub
Convert your css to scss by extracting mixins and nesting rules and properties in scss files in Visual Studio Code using the Sass Helper.
Starred by 11 users
Forked by 4 users
Languages   TypeScript 93.0% | CSS 7.0%
Find elsewhere
🌐
DEV Community
dev.to › clgolden › there-s-a-new-vs-code-sass-compiler-in-town-4ij8
There's a New VS Code Sass Compiler in Town - DEV Community
May 9, 2021 - While exploring SASS compiler options for VS Code, the articles and videos I found kept leading me to Live Sass Compiler by Ritwick Dey. This compiler also installs an extension called Live Server. The installation went smoothly and I set up my .scss files. I use partials to organize my CSS.
🌐
Quora
quora.com › How-do-I-connect-a-SASS-file-to-a-CSS-file-in-VScode
How to connect a SASS file to a CSS file in VScode - Quora
Answer (1 of 2): Do you mean how to convert a Sass file to a CSS file? The best option is to use a build tool like Gulp/Grunt. You can also use module bundlers like Webpack or Parcel but, I think, that would be overkill.
🌐
Coding Campus
codingcampus.net › home › how to compile sass/scss to css in visual studio code
How to Compile SASS/SCSS to CSS in Visual Studio Code - Coding Campus
December 2, 2022 - Click on the Watch Sass button from the Status bar. Finally, the extension will generate a .css and map.css file inside the project folder.
🌐
Read the Docs
vscode-docs.readthedocs.io › en › latest › languages › css
CSS, Sass and Less - vscode-docs
This is supported for Sass and Less variables in the same file. Note: Cross file references ('imports') are not resolved. VS Code can integrate with Sass and Less transpilers through our integrated task runner. We can use this to transpile .scss or .less files into .css files.
🌐
GitHub
github.com › ritwickdey › vscode-live-sass-compiler › blob › master › docs › settings.md
vscode-live-sass-compiler/docs/settings.md at master · ritwickdey/vscode-live-sass-compiler
Compile Sass or Scss file to CSS at realtime with live browser reload feature. - vscode-live-sass-compiler/docs/settings.md at master · ritwickdey/vscode-live-sass-compiler
Author   ritwickdey
🌐
Robkjohnson
robkjohnson.com › posts › how-to-set-up-sass-scss-compiling-in-vs-code
How to minify, complile and output your sass/scss to a specific file location by Rob Johnson
Install the VSCode Live Sass Compiler extension by selecting View + Extensions in the main menu and searching for Live Sass Compiler. Create a folder .vscode at the root of your project if it doesn't already exist ...
🌐
BlueWindLab
bluewindlab.net › setup-live-sass-compiler-for-visual-studio-code
Setup Live SASS Compiler For Visual Studio Code Editor
June 30, 2025 - Easily install and configure the Live SASS Compiler extension in VS Code. Compile SCSS to CSS in real-time, save, and speed up your front-end development.
🌐
GitHub
github.com › ritwickdey › vscode-live-sass-compiler
GitHub - ritwickdey/vscode-live-sass-compiler: Compile Sass or Scss file to CSS at realtime with live browser reload feature.
A VSCode Extension that help you to compile/transpile your SASS/SCSS files to CSS files at realtime with live browser reload.
Starred by 658 users
Forked by 173 users
Languages   TypeScript 63.1% | JavaScript 20.9% | HTML 11.3% | SCSS 4.7% | TypeScript 63.1% | JavaScript 20.9% | HTML 11.3% | SCSS 4.7%
🌐
Glenn Marks
glenn2223.github.io › vscode-live-sass-compiler
Home Page | Live Sass Compiler | VSCode Extension
Live SASS & SCSS compile. Customizable file location of exported CSS. Customizable exported CSS style (expanded, compressed). Customizable extension name (.css or .min.css). Quick status bar control. Exclude specific folders by settings. ... Click to Watch Sass from the status bar to turn on the live compilation and then click to Stop Watching Sass from the status bar to turn off live compilation.
🌐
Medium
epaphrasakinola.medium.com › how-to-set-up-sass-on-vs-code-708ae115f28a
How to set up SASS on VS Code. A Step-by-Step Guide to Integrating… | by Epaphras Akinola | Medium
February 13, 2024 - How to set up SASS on VS Code SASS is a CSS preprocessor designed to enhance the convenience of styling. However, it needs to be converted to CSS for the browser to interpret it correctly. When …
🌐
Medium
medium.com › @elijahthomas.dev › top-10-vs-code-extensions-for-html-css-sass-developers-7cbfb69474b8
Top 10 VS Code Extensions for HTML, CSS, & SASS Developers | by Elijah Thomas | Medium
September 13, 2023 - They include tools for live previewing, real-time SASS or SCSS compilation, code completion, image preview, and IntelliSense. You know how challenging it can be to work with HTML and CSS files, especially when it comes to completing id and class attributes, linking style sheets, and ensuring that selectors are valid.
🌐
freeCodeCamp
forum.freecodecamp.org › t › vscode-scss-not-compiling-to-css › 484834
VSCode: SCSS not compiling to CSS - The freeCodeCamp Forum
November 9, 2021 - I’m working in VSCode using HTML, SCSS and Bootstrap. All installed via npm from the terminal. I was working on and suddenly came across a bug which led to 2 hours of time wasting to find out the SCSS has stopped compiling to the main style.css sheet. All the extensions are working fine. I have the sass ...