-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
language service features not working for WSL config #3052
Comments
Thank you for reporting the issue. This appears to be a duplicate of #2807 which will be fixed in our next release. |
Are you sure that the fix for #2807 resolves this problem? It was mentioned in #2807 that the error only occurred when immediately editing a file, and that it appeared to have no adverse effects on anything else. In this case it appears to completely prevent intelliSense from functioning. Also, is there any ETA for the next release? |
Sorry, I read the title and assumed this was the same issue. We plan to release an update on Tuesday next week. You can install the pre-release version by downloading the .vsix from here: https://github.com/Microsoft/vscode-cpptools/releases/tag/0.21.0-insiders4 or changing the setting: |
And if you remove If you could enable logging and share the logs with us, we can investigate further. |
Thanks for the response. I've tried the pre-release version and now the errors in the Developer Console are gone. However, intelliSense and syntax error checking are still not working and I am getting a similar issue to #1377 with the following output in the logs:
I noticed that someone posted regarding this issue 5 days ago in that thread here, so this issue might be related. If you need any additional details please let me know. |
You're hitting: |
I have tried reinstalling both VSC Insiders as well as the cpp extension pre-release that bob provided. I downloaded VSC Insiders from the official VSC website and installed normally. To install the .vsix I went to extensions and chose to install from .vsix and opened the folder where the .vsix was located and chose the .vsix file. I've located the Microsoft.VSCode.CPP.IntelliSense.Msvc.exe file in my .vscode-insiders\extensions\ms-vscode.cpptools-0.21.0-insiders4\bin directory. Double clicking it causes the command prompt to come up for a split-second and then disappear. Running it in command prompt does nothing (there's no output). When I've reinstalled I've also deleted the .vscode folder, so I think it's unlikely that the binary would be corrupted every time. From some basic googling, perhaps I am somehow missing a DLL? Any suggestions? |
Yeah, missing some required OS DLL is a possibility. Can you open the binary in a dependency checker such as http://www.dependencywalker.com/ and see if anything appears to be missing -- you should see 4 bogus errors and 2 bogus warnings that you can ignore, but if you see more, then that is a problem. |
I get the same the API-MS-WIN-CORE messages, so that is okay. There appears to be some issue with it loading 64-bit DLLs instead of the 32-bit ones. When you right-click to view the properties of Kernel32.dll does it show C:\Windows\SysWow64 ? Our binaries are 32-bit on Windows (64-bit on Mac/Linux). |
It shows the location as C:\windows\system32 |
Oops I should've specified that in my original post. It is 64-bit. |
Does |
kernel32.dll exists in that folder. The error persists with the 0.21.0 release. |
If you open the Microsoft.VSCode.CPP.Extension.exe with the Dependency Walker does it show the same results (i.e. 64-bit DLLs)? If so, then it would suggest it's not related to the IntellSense process failure...unless there's some difference in our method of child process spawning versus how VS Code launches our main process. |
Also, have you ever gotten our IntelliSense process to work (i.e. is this a regression) or are you a new user? Are you able to use the Install Another Version... feature to select an older version that works? |
Opening Microsoft.VSCode.CPP.Extension.exe with the Dependency Walker shows 64-bit DLLs as well. I'll try to do a little researching online as to what could be the issue. Do you have any suggestions? I'm a new user and so far it hasn't ever worked. EDIT: I also used Dependency Walker's 32-bit version and the paths for the DLLs are still the paths the 64-bit versions. I've also tried older versions up to a year old and they all have the "Failed to create IntelliSense client" issue albeit with less descriptive errors. |
Can you run ProcMon (Process Monitor) https://docs.microsoft.com/en-us/sysinternals/downloads/procmon and see what errors or suspicious info it reports? You can filter on "Process Name is Microsoft.VSCode.CPP.IntelliSense.Msvc.exe". You should see a Process Start operation and Load Image operations should be called on various DLLs -- the last events shown may give a clue to the problem. You may not want to run Proc Mon for too long though, because it can use too much system resources and potentially cause "issues". One possibility is that you have some incorrect registry key relating to WOW64 that is causing the wrong DLLs to load when we call our CreateProcess, see https://docs.microsoft.com/en-us/windows/desktop/Dlls/dynamic-link-library-search-order . We haven't gotten any other reports like this yet so it seems like some rare OS configuration issue. If you have enabled Win10 case-sensitivity enabled on the path where our binary exists that might lead to an issue like this (we don't currently support/test that scenario). |
Case-sensitivity is not enabled on the path. I've attached the output that Procmon produces when I try running Microsoft.VSCode.CPP.IntelliSense.Msvc.exe manually. Nothing was popping up in Procmon when I was typing in VSCode, even though errors were showing up in the VSCode output. I tried taking a look at the Procmon output myself, but I'm no expert and couldn't tell which non-successes were okay and which ones weren't. |
The ProcMon from the manual run appears okay to me -- it's using the 32-bit SysWOW64. The fact that no ProcMon data appears via our extension must mean that there is something special with how our main process is launching the child process. Can you run ProcMon, open some (small) workspace folder so our main process launches, clear the ProcMon log, change your includePath to an empty array and your compilerPath to an empty string (to reduce the ProcMon noise), change the filter to Microsoft.VSCode.CPP.Extension.exe (make sure that process is using 0 CPU first though), then open a C/C++ file. This should cause a Process Create operation to get logged for the Microsoft.VsCode.CPP.IntelliSense.Msvc.exe process or some other sort of failed operation related to that. |
@haovic From the other report of this, it sounds like the repro may occur when your user name has a space and you also have a file that matches the first word of your user name in the Users folder, so deleting that file might resolve your issue (we're still investigating a fix). |
Hi Sean, that was exactly the issue! I had a file named "Victor" in my Users folder that was automatically generated by Xilinx Vivado if anyone else happens to have the same thing happen to them. I also think it's worth mentioning that I realized this week that the issue wasn't just limited to VSCode or this extension, as I made a new C++ project in Visual Studio 2017 Enterprise and intelliSense didn't work for that as well. However, intelliSense did work when I opened old projects or copy pasted old project directories within the same directory. However, it didn't work if I tried to copy paste an old project to a different directory. Autocomplete also was not working for Sublime Text when I tried installing that, so it's possible that somehow all of this is related. It may also be helpful to know that my Visual Studio 2017 intelliSense was working perfectly fine before I installed an update during the second week of January in addition to installing Python for VS2017. I installed VSCode immediately afterwards during that same session, so it's possible that some update to VS2017 broke something out of my control. Just food for thought. I was pretty busy this week so sorry for the late reply. If you need me to run any other tests, please let me know. I'm immensely grateful for your help, and keep up the great work! EDIT: intelliSense for new VS2017 projects is now working again as well! Sublime Text autocomplete still doesn't work so that may have just been a mistake setting it up on my side. |
The bug with IntelliSense not working on Windows when the username has a space in it should be fixed with 0.22.0-insiders2: https://github.com/Microsoft/vscode-cpptools/releases . |
Intellisense is working perfectly with the 0.22 update! Thank you so much! |
Type: LanguageService
Describe the bug
My intelliSense and syntax error checking (red squiggles) do not work at all, and I am getting massive amounts of the errors in the title when I check the Developer Tools. I believe the issues to be related. Whenever I type in a C++ file (even after waiting so not like issue #2807 ), tons of these errors appear.
To Reproduce
Expected behavior
IntelliSense suggestions/Syntax Error Highlighting appears.
Actual behavior
If Developer Console is open, number of 'map' errors increases linearly with amount of text typed. Only most basic possible suggestions appear (even #include is not auto-completed) and no syntax error checking.
Screenshots
Additional context
I've also tried different combinations of almost all settings regarding intelliSense, as well as reinstalling both the extension as well as VSCode itself (reinstalling meaning I wiped every trace of VSCode from multiple system folders). The Insider Edition does not solve this issue either. Here is an example of my c_cpp_properties.json
I know that I do not have an includePath in this example, but I heard it might be worth trying to take it out. Currently, I have intelliSense fallback disabled. I think it's also worth mentioning that tag parser/fuzzy works to the extent of autocomplete when turned on, but syntax highlighting continues to fail. intelliSense works for Python.
Copy paste of the error msgs:
The text was updated successfully, but these errors were encountered: