Visual Studio 2015 JavaScript Intellisense weird behavior

I am working on an MVC application in Visual Studio 2015. Suddenly, intellisense for JavaScript files began to behave strangely. Sometimes intellisense does not appear, but can be displayed using a keyboard shortcut. A worse problem is that it does not display local variables. The screenshot is here: http://i.imgur.com/RvyQVTm.jpg . The local variable abcde not in the list. Here is a screenshot of the correct behavior: http://i.imgur.com/w5LM0JA.jpg . I get similar behavior for object attributes when writing a method (intellisense does not show attributes when writing this. ).

The problem started with my laptop. I tried to solve it. I tried different solutions, but no luck. The reason is that the solutions I found were not for my specific problem. I even tried reinstalling Visual Studio.

Since I could not fix this on the laptop, I tried installing Visual Studio on my desktop with a fresh installation of Windows 10. I created a new project and transferred the files from the laptop to the new project. Intellisense was working on a new project. I wrote the code, saved the project, and turned off the computer.

When I returned to my project a few days later, I noticed that intelligence behaves the same as on a laptop.

The most interesting thing is that intellisense works in any new project that I create.

I am really desperate because I have already spent so much time to fix this problem. I will be happy for any help.

+8
javascript visual-studio visual-studio-2015 intellisense
source share
1 answer

Since I posted this question, I have learned how to minimize (possibly even fix) the problem:

  • I created a new solution for the project and moved all the files there, copying their contents.

  • I will not turn off the computer. I am using hibernation with running Visual Studio. This may not be necessary because my project survived one restart of Windows Update and several restarts of VS due to plugin updates.

  • If you encounter a problem, check for syntax errors, as gpersell suggests. Once intellisense went broke for me when I tried to call a function with missing brackets.

  • If you are sure that there are no syntax errors, leave the computer for a while. This may sound silly, but it already helped me three times. I usually leave the computer for 5 to 15 minutes when Visual Studio is working with an open project, and when I return to intellisense again.

  • Do not delete the contents of the \obj\Debug and \obj\Release folders. Use the Visual Studio Clean Project feature instead.

  • If none of the above helps, start again from point 1.

I hope this helps someone.

0
source share

All Articles