locked
JavaScript language service has encountered an error and has been shut down

    Question

  • ANSWERED! Please see below.

    This started happening all of a sudden on my VS12 Ultimate on Windows 8 RP, and doesn’t go away. Any JavaScript project loads and compiles, but code loses all debugging and IntelliSense capability on any JavaScript project (code has no syntax highlighting). F5 still launches the project, but there's no way to set a breakpoint.

    This is what a Message box says:

    "JavaScript language service has encountered an error and has been shut down. Please save your changes, exit, and restart Visual Studio." Restarting VS12 doesn't help.

    P.S. I can reproduce it now. My sequence of events: start with a brand new account on Windows 8 PC and Visual Studio Ultimate. Had installed Snippet Designer add-in, played a bit with a bunch of new projects with snippets, using Share contract. Deleted some projects from Documents. And then boom: debugging and intellisence is gone from JavaScript projects.

    P.P.S Since I suspect there's something in the user profile that JS Language Service caches (new Windows 8 account works fine), I tried deleting local profile Documents\Visual Studio 2012 folders, and AppData\Local and \Roaming folders related to VS12. Sometimes it helped, sometimes not. I also uninstalled Snippet Designer add-in. At some point (not immediately after deleting local folders and add-in) JS Language Service started working again.

    I'd like to know how to reset JavaScript Language Service if these issues happen?






    Friday, June 15, 2012 11:31 PM

Answers

  • I was able to fix it: Uninstalling Snippet Designer and deleting the Code Snippets folder on C:\Users\USER\Documents\Visual Studio 2012
    Tuesday, June 19, 2012 12:03 AM
  • Hi Kevin,

    You are probably running into a bug in VS 2012 RP where JavaScript IntelliSense will crash on duplicate snippet shortcuts (including multiple blank shortcuts). You should be able to work around this by adding a unique shortcut to each of your snippets. This can be done either in the snippet xml directly or through the Properties window in the snippet editor. Hope that helps.

    Tuesday, June 19, 2012 1:39 AM

All replies

  • I am also hitting this issue. It started happening after I tried creating a js file called data.js. VS2012 stalled when trying to create it and boom there was the problem. In fact every time I try opening VS I get the same error, even if I restart the PC. I also installed Snippet Designer... 
    Monday, June 18, 2012 11:52 PM
  • I was able to fix it: Uninstalling Snippet Designer and deleting the Code Snippets folder on C:\Users\USER\Documents\Visual Studio 2012
    Tuesday, June 19, 2012 12:03 AM
  • Hi Kevin,

    You are probably running into a bug in VS 2012 RP where JavaScript IntelliSense will crash on duplicate snippet shortcuts (including multiple blank shortcuts). You should be able to work around this by adding a unique shortcut to each of your snippets. This can be done either in the snippet xml directly or through the Properties window in the snippet editor. Hope that helps.

    Tuesday, June 19, 2012 1:39 AM