- Instant help with your Developer coding problems

Comment out multiple lines in VSCode

Question:
How to comment out multiple lines in VSCode?
Answer:
// Comment out
CTRL + K CTRL + C

// Uncomment
CTRL + K CTRL + U
Description:

There are multiple ways to comment out lines in Visual Studio Code. First, select the lines you want to comment out or uncomment. Then you can use the menu and select Edit -> Toggle Line Comment.

A faster way is to use keyboard shortcuts. You can use the simple CTRL + / , however, it depends on your language settings and keyboard layout. If CTRL + / doesn't work then you can check the real shortcut using the menu where you can see the actual value.

Another shortcut option is to use CTRL + K CTRL + C to comment out lines and CTRL + K CTRL + U to uncomment lines.

Share "How to comment out multiple lines in VSCode?"