-
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
WSL/Ubuntu : Autocomplete feature & Quick info (tooltips) feature do not work. #1377
Comments
@bobbrow @sean-mcmanus @CoenraadS Please, have a look at this issue. |
We should be autocompleting when the # is used and also on the using/namespace keywords. Is your "C_Cpp.autocomplete" set to "Disabled"? |
@sean-mcmanus No, sir I've thoroughly gone through such minor settings and everything seems OK to me. VSCode doesn't show a single hint(dropdown options) while typing.
|
I assume your workspace settings don't overwrite those user settings, right? Are you doing an open folder or open file? The "include" keyword that comes after the # should always be auto-completed unless the browse database is failing to get created -- can you set your databaseFilename in c_cpp_properties.json so something like |
@sean-mcmanus Also, despite having enabled
|
The keyword completion code is shared by both the Tag Parser and Default intelliSense engine, so the results there should be the same unless the IntelliSense code is blocking the main thread for some reason, causing the completion code to not execute at all. It's recommended to use the Default intelliSenseEngine if possible (the includePath and define settings in c_cpp_properties.json might need to be configured correctly though). The Tag Parser fallback will only be used if it fails to find |
@sean-mcmanus I've copied the exact same configuration for |
@sean-mcmanus I've just discovered this issue in the C/C++ extension's log while using the Default engine. This might help you to determine the issue. |
Yeah, it's not able to start the Microsoft.VSCode.Cpp.IntelliSense.Msvc.exe process. Does the file exist in the |
Dangling Microsoft.VSCode.Cpp processes (i.e. still alive after closing VS Code). Everything looks good. I don't think we've ever encountered this issue before on Windows. Could the Insiders build of Windows have something that breaks us? If you were on Linux I'd say to make sure the file has executable permissions. Maybe @bobbrow will have some suggestions when he gets back next week. We may need to check the GetLastError result after calling CreateProcess and add better logging. |
I've also tried the following conditions,
but still kept getting the same error i.e
I don't think an anti-malware application (Malwarebytes or the Windows Defender itself) could be causing this ? |
Have you tried running VS Code as an admin? Does your installation directory (the .vscode/extensions one) have any non-ASCII characters in it? We had some problems with that previously but they got fixed. You might try running Process Monitor (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon ) filtering by the Microsoft.VSCode.CPP.IntelliSense.Msvc.exe Process Name (or maybe on the Extension.exe process since maybe it will show the CreatProcess error code on that process). |
Yeah, you should be able to use Process Monitor on the Extension.exe process to see the error code from the Operation "Process Create". I don't know if the error code it shows will be useful though. |
Running VSCode as an admin didn't work either. My absolute path of the installation directory however has a space between my name & surname, but no non-ASCII characters in it. I recall me having same issue during my Android Studio installation which required me to install Android SDK in the path with no space between name. Can you confirm that space isn't the issue so that I won't have to reinstall VSCode again into different location ? |
Sure, I'll try testing it with a space in the user name... |
It works with a space in the user name. We haven't received any reports like this yet, but it's possible users are hitting it without realizing it, so we'll try to investigate more... |
Do update this thread as soon as you discover something helpful and I'll also try my best to figure out the issue myself too. |
"Unable to start child process!" is the error that I return when the CreateProcess API call fails. Perhaps I can add some logging for the inputs to that API. |
I am getting the same error. Failed to spawn IntelliSense process: Unable to start child process! |
@starkblitz What version of the C/C++ extension are you using? Can you provide more repro details? |
Here are the version info
Here is the output file of the extension:
Here is my c_cpp_properties.json file:
|
@starkblitz Your report matches the 193 error reported in #3052 . 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. |
I was also experiencing the 193 error with the
My username is Shubham Avasthi on my windows machine (notice the space). I tried to get some insights from ProcMon as instructed and found out that the C/C++ extension was trying to access Also, in my startup in Task Manager, a file named The content of the file was:
Enabling the file in startup and rebooting did not help. On right clicking the file and clicking After reboot, the file did not reappear and was gone from Startup as well and finally, Intellisense works without any issues. I believe the C/C++ extension was trying to access Addendum : Now my system seems to run much smoother as well. Addendum2 : The first addendum is probably not true. |
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 . |
Wonderful!! Intellisense is working perfectly with the 0.22 update! Thanks! |
The text was updated successfully, but these errors were encountered: