How to make CTRL + / toggle a comment in Visual Studio

You can't make it toggle without going into either a macro or other VS extension.

However, I always setup VS to comment with Ctrl + / and uncomment to Ctrl + Shift + /

You can customize the keyboard shortcuts by going int the "Tools" menu and selecting "Options". Then select "Keyboard" from the "Environment" branch. From there you can bind the Edit.CommentSelection and Edit.UncommentSelection commands to whichever keyboard shortcuts you'd like.

Here is a plugin to have the almighty "Toggle Comment" command...

1- Download and Install >

2- Restart VS

3- Go to "Tools > Options... > Environment > Keyboard"

4- Search for the command "ToggleComment" & Bind it to your favorite key

5- Enjoy

(Thank you, I had gave up but finally found this easy way to do it ;D)

If you have ReSharper installed (and using VS without it is/was tedious), you can assign a single key to the command ReSharper.ReSharper_LineComment.

For instance, I bind the keyboard shortcut Ctrl-K, Ctrl-C to the command, and then if I use it on a line that is uncommented, it comments it, and if the line is commented, it will uncomment it.

enter image description here