The "Toggle Line Comment" editor.action.commentLine is broken. (key combo in MacOS: cmd /)
It works with other formats (yaml, json, c++, shell, etc) but its not (no longer?) working with Terraform files.
VSCode Terraform Plugin Version: 2.2.2
I'm encountering this issue with v2.2.2 as well.
I rolled my extension back to v2.2.1 and "Toggle Line Comment" starts functioning again, so the problem appears to have been introduced with v2.2.2
VSCode 1.48.1
MacOS 10.15.2
Hi! Sorry you're seeing this behavior. We're having trouble reproducing it with a default configuration – could you share your settings files?
Hmmm, I reinstalled v2.2.2 just now and the issue appears to have resolved itself!
@Helmut-Onna does the issue still occur for you?
Hi, it is fixed now, close if you want.
But please note I had to follow the "downgrade-upgrade version" steps similar to what Eric described since my first attempt to install it "from cero" didn't worked:
1- uninstal extension/plugin (vscode will restart/refresh)
2- install latest (v2.2.2) terraform plugin/extension,
3- try a TF file, not working
4- downgrade to extension v2.2.1 (vscode restarts/refreshes itself)
5- confirmed, toggle comments work
6- upgrade to v2.2.2 (vscode restarts/refreshes itself)
7- try again toggle comment line in a TF file, it works!
Maybe it was a leftover from my previous upgrade/downgrade attempts when the highlighting was broken in v2.1.1+ (went down in versions one by one to 2.1.0 since highlighting was working on that one)
Anyway, thanks a lot for the help, specially to Eric since without that downgrade step I guess I would had required to reinstall vscode fully :)
I just experienced the issue again, immediately after updating the language server. The same downgrade-then-upgrade approach resolved the issue, but I'm curious about why the LS update caused the issue.
May have been related, also seemed to involve terraform, would suggest whatever bug this is (whether be in the plugin, or upstream vscode) it has maybe been around since May:
https://github.com/microsoft/vscode/issues/98110
Hi @ericmacfarland – would you be willing to file a bug upstream on the VSCode project? We'll keep looking for something on our end as well.
Uninstalling and reinstalling fresh worked for me.
I was very close to completely ditching this plugin before I found this GitHub issue. Thanks @ericmacfarland for your suggestion.
Also facing this issue from time to time. Just found out that simple Disable-(Reload)-Enable the Terraform plugin helps.
none of disable-reload-enable or reinstalling or downgrade/upgrade worked for me.
only seems to be terraform files for me. other files work fine.

extension version 2.5.0
This issue is still present, but I discovered an odd workaround for it earlier today. If you install the HCL extension, you'll get the ability to comment back but it will be with // rather than #. You'll notice at this point that your tf files show as type "HCL" in the bottom right.
If you change the file type back to "Terraform", the old commenting shortcut works again and uses # like before.
No idea why this works, but it does. If you uninstall the HCL extension, the shortcut stops working again.
Same issue here
Once I updated to VS 1.55.2 ctrl + / started working for me.
can confirm that vscode Version: 1.56.2 (Version: 1.56.2 on OS: Darwin x64 18.7.0 ) with hashicorp.terraform extension (v2.11.0) it also stopped working after upgrading language server.
I didn't need to downgrade, just uninstall and install the extension again, and block comment (cmd+/) started to work again.
Disable/enable the plugin was enough for me
Disable/enable the plugin was enough for me
same
I just encountered this problem. A reinstall worked fine using the developer tools to reinstall extensions.
Most helpful comment
Same issue here