Since installing Visual Studio 2017 I have been struggling to get my code folding to work in Javascript. I can't begin to explain how many hours I have wasted trying to find a solution for a problem I was having, and trust me, I have Googled like mad. So in an attempt to help someone who might be struggling with the same issue and kind find the answer, here are the steps I took to fix it.
- Open a .JS file.
- In the editor window, right click and navigate to Outlining > Stop Outlining.
- Right click again and navigate to Outlining > Start Automatic Outlining.
- Close the file, and reopen it.
The issue should not be fixed. It's a simple trick, and I have no idea why outlining does this, but hey, this fixes the issue.
Top comments (4)
UPDATE: Disabling the new Javascript Language Service did the trick to permanently fix this issue. This can be disabled by going to Tools > Options > Text Editor > Javascript/Typescript > Language Service.
Thank you SO MUCH this was driving me nuts and i never thought about doing these very simple steps, honestly i was thinking about downgrading i surfed online for more than 5 hours... thank you, thank you, thank you!
I tried this Not working for me
Thanks for this!