Is there a way to deactivate several lines of code in visual studio?
I’m currently typing // in from of each line when I need to deactivate a segment of code (for debugging etc), but it gets tiresome.
Is there a way to deactivate several lines of code in visual studio?
I’m currently typing // in from of each line when I need to deactivate a segment of code (for debugging etc), but it gets tiresome.
2
Answers
In C/C++, use
/*
and*/
for multi-line comment - this will make the code not run. Example:In Python you use
"""
for multi-line comments. Other languages might have different ones.Search for
Toggle Line Comment
And edit the key combintion and choose whatever you want to perform that action