_From @wuzhijiexia on August 28, 2016 6:17_
Steps to Reproduce:
_Copied from original issue: Microsoft/vscode#11059_
_From @mrmlnc on August 28, 2016 22:12_
Please move this issue into repository of C/C++ extension: https://github.com/Microsoft/vscppsamples/issues.

This should be fixed in the next release of the cpptools (version 0.9.0). This release should be available in the next week or so. If you still run into the issues at that time please reopen this bug.
This problem still shows up on 0.9.1.
Output window shows:
[11:06:19 AM] Connection to server got closed. Server will restart.
[11:06:19 AM] Connection to server got closed. Server will restart.
[11:06:19 AM] Connection to server got closed. Server will restart.
[11:06:19 AM] Connection to server got closed. Server will restart.
[11:06:19 AM] Connection to server got closed. Server will not be restarted.
Could you help clear up what server it is trying to connect to? If this is a local settings (which I couldn't find), could you point us to it?
Thanks
@pieandcakes, is this our debugger extension trying to download dependencies, or @sridmad is this the language server?
@jgoshi @delmyers @sridmad This is from the download manager. I found this error message in the language client code.
The server is the Microsoft.VSCode.CPP.Extension.exe. It appears to be crashing. Sounds like we need more repro or crash details.
I'm not familiar where to get more logs or crash information for this extension but if anybody would point that to us here, I'd be more than happy to provide it.
Thanks for looking into this.
Can you re-open if it's not fixed in 0.9.2? There may be crash info in the Windows Event Viewer.
Hello Sean, thanks for checking back.
I've updated to 0.9.2 just now, I still see the same errors per previous output I included. I checked Windows Event Viewer and didn't see anything that registers there after I relaunch VS and after the error message pops up.
If it helps, here's the other output under C/C++ dropdown option.
Updating C/C++ dependencies...
Downloading package 'Visual Studio Windows Debugger' (12073 KB) .................... Done!
Downloading package 'C/C++ language components (Windows)' (2514 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (810 KB) .................... Done!
Installing package 'Visual Studio Windows Debugger'
Installing package 'C/C++ language components (Windows)'
Installing package 'ClangFormat (Windows)'
Finished
Having this same issue too. Any solutions yet? Using v 0.9.2 . Really want to use VS code to code in C but these issues are really starting to deter me.
What are your repro steps? On VS Code startup? Are you making changes to an unsaved document like "Untitled-1"? Our extensions should work with C code just as well as C++ code. We have a known crash when an unsaved document is used as a C/C++ file.
Well I just freshly installed VS Code. Installed the C/C++ 0.9.2 extension, enabled. Then when I type cmd+k, m and select C, then type a letter it gives me that error. Yes, it is on VS code startup and typing into unsaved Untitled-1 document. Is this why it doesn't work for Java either? Because it is an unsaved document? For Java it gives me error of "couldn't start client Language support". Sorry, I'm new to all this so I have no idea what that means :/
Yes, we don't currently handle the unsaved file case correctly. If you save the file first (so it exists on disk somewhere), our tool should be usable.
Ah okay great, that fixed it. No longer getting that error. Just out of curiosity, is VS code capable of automatically importing necessary header files? For example, if I type "pri", will it suggest "printf" and automatically import
We have some rudimentary auto-complete (which will get better later), but no auto-#include adding. Opening a folder gives best results.
I also get this error everytime with Visual Studio Code v1.7.1 and C/C++ v0.9.2.
I have an Arduino Project folder (with .ino) files open. Doesn't it work with Arduino?
We've never tested with Arduino projects. We support C/C++ projects. If you can provide a repro of the crash we could investigate.
it happens with any arduino project I tried so far. for example any of the examples included with the arduino ide. or for example this here: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/NTPClient/NTPClient.ino
when I put that in a folder, open the folder with VS Code and wait a bit, the message pops up.
Error still occurs on VS Code version 1.7.1 and cpptools v 0.9.2

Still occurs on VS Code ver 1.8.1 and C/C++ tools 0.10.0, on macOS

This bug appears to be tracking multiple different crashes. Which crash scenario did you want fixed? We haven't fixed the "unsaved file" or Arduino crashes yet.
Hi - I am experiencing a similar issue. I am not working on "unsaved files" or Arduino. The cpp extension functionality like "Go To Definition" simply never work, and the message about language server crashing shows up sporadically. I've attempted to reinstall the vscode completely,
however issue persist even after reinstall. I've found information regarding specifying full path to "browse.VC.db", since this file seemed not to be created. After this modification I do see the files "browse.VC.db", "browse.VC.db-wal", "browse.Vc.db-shm". This did not help, and I am still unable to use "Go To Declaration" or "Peek Declaration". At the same time I am concstantly seeing the fire icon next to configuration status in the bottom bar.
Code Version: 1.9.1 f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
Extension Version: 0.10.1
OSVersion: macOS Sierra 10.12.3
I know this is not the most detailed bug report, but the behavior I am seeing is bit bizzare.
The fire icon means where scanning/parsing the workspace and includePaths, until that is finished some definitions may not be found. Can you try 0.10.3? We fixed a number of issues.
This issue still exist in version 0.10.3.
@huhutm Can you provide more repro info? I need to know what OS you're on. What is the size of the .browse.vc.db? What is the behavior of the Microsoft.VSCode.Cpp.Extension process before and after the failure? I assume you're getting the message "The C/Cpp Language Server server crashed 5 times"? What actions are being done before the crash? Does it crash without any actions? We have a parsing thread that runs when the config is red in the bottom right, so we need to know if that is red and if the #include squiggles say "Searching..." or not.
I run into this writing Arduino code, so I'd like to see it fixed for that case.
However, if there are multiple crashing cases, perhaps actually fixing all of them would be best ;-)
Arduino projects are C++ projects that have one "main" file in a file named ".ino" and the allows additional .cpp and .h files in the same directory, plus references to external libraries where .cpp and .h files go in the same directories.
The Arduino IDE pre-processes the ino file to add a few default include headers, and looks for the external include .h files to know what external .cpp files need to be built.
However, largely, this should look like a C++ project where ".ino" should be treated as ".cpp"
@jwatte-imvu We need info on how to repro the crash. What is your OS? 64-bit Ubuntu? Does it crash immediately or after editing for a few minutes or after only letting the parsing thread work after opening a workspace? I can open the Arduino-1.8.1 folder and open example .ino files and I don't get any crashes.
My OS is 64-bit Windows 10 Pro. I separately also have Visual Studio 2015 Pro installed.
The crash happens after a number of minutes of editing.
I installed an update of the C++ tools today, and it identifies itself as version 0.10.3.
Open an Arduino project as a folder, preferable one with a .ino file as well as a few .cpp and .h files, and you should see this happening if you work on it for a bit.
I'll see if I can attach to the Microsoft Cpp process and catch it in an exception.
There are no public symbols on the Microsoft symbol server, so the stack trace isn't particularly useful, but I did get a dmp file.

Unfortunately, the dump file is too big to upload in this issue tracker.
I have put a copy of it on the web at:
https://watte.net/Microsoft.VSCode.CPP.Extension.dmp
The final Debug Output line before the death is std::length_exception, which might be related.
That was super helpful. @sean-mcmanus, this looks like it's caused by the recent updates to parameter help.
@jwatte-imvu, the crash is on line 59, char 24 of one of your source files. Parameter help is being invoked on what looks like a simple open parenthesis and it fails to find a function identifier before the open paren because this isn't a function call.
The bug has been fixed and we'll release it in our next update (hopefully early next week). The bug reproed whenever there's a non-alphanumeric character, a whitespace, and ( is typed. It was caused by a fix to signatureHelp in 0.10.2.
Glad you could find it! I parenthesize sub-expressions with some frequency, so that would be why I would see this problem frequency. Looking forward to the fix!
The signature help bug has been fixed and is in version 0.10.4. Please give it a try and let us know if you are still having issues.
same issue here

@thiagoh It's the same symptom (a crash), but we need more details to diagnose the cause. Can you file a new bug with the crash report Users/…/Library/Logs/DiagnosticReports/<process><date><machinename>.crash. Also, our pending update fixes some known crashes.

I have the same issue
@nygymankussainov , you may be having this issue #4096, but it only seems to occur on macOS version 10.12. Can you confirm your OS by posting at issue #4096?
Most helpful comment
The bug has been fixed and we'll release it in our next update (hopefully early next week). The bug reproed whenever there's a non-alphanumeric character, a whitespace, and ( is typed. It was caused by a fix to signatureHelp in 0.10.2.