-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Intellisense stuck in "Parsing..." state. How can I debug further? #1034
Comments
Here is the same situation. After the last update Intellisense is completely unusable. There are four small logs and one large. The small logs show that something goes wrong:
|
I have solved the problem. It seems IntelliSense was unable to parse some GCC machine specific include files. So I have created an alternative ones with the necessary defines and arranged paths so that IntelliSense includes alternative ones, while GCC includes standard ones. |
@sov1178 any hints on how you were able to determine that was the problem? :) |
We have logging instructions at https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/Enabling%20logging.md . Yes, the parser has a known infinite loop with certain files (see #981 ). I don't think we regressed the scenario with 0.12.4 though -- if you believe we did regress it you can try the older version at http://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/cpptools/0.12.3/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage (renaming the zip to vsix and using the Install from vsix command). @prmshepherd You can narrow down the problem by first opening your workspace without opening any files. If the parsing (red flame) goes away, then the symbol database has finished generating successfully (Tag Parsing). Then you can open a file and the IntelliSense will start -- if that gets stuck then you can tell that the source file or one of the headers up the chain caused the IntelliSense parser to get stuck. You can also look at what process is using CPU (the IntelliSense.Msvc process is the IntelliSense one). |
Thanks @sean-mcmanus! Looks like Tag Parsing is good, so most like an issue somewhere in my include hierarchy. Is there any logging to capture the parser's progress through the headers? I didn't spot anything at VSCODE_CPP_LOGFILE_LEVEL=5 |
@sean-mcmanus it seems like IntelliSense did not like some of the GCC machine dependent headers. I have made some investigations and ended up adding a long list of defines GCC declares implicitly to the |
@prmshepherd It turns out we don't have logging for the Default IntelliSense parsing, but we could add that. |
@sean-mcmanus Some more information. The problem arises when IntelliSense process was not terminated correctly. It definitely not the issue #981. I do not know why it is not terminated sometimes. And I was unable to find any conditions to reproduce the problem (one IntelliSense process stays unterminated from time to time after VS Code closing). But maybe this information can be useful. |
@sean-mcmanus I think adding those logs will be very useful. Even better if the progress and status of the parser could be integrated somehow into the UI itself if that is possible? |
Logging is now integrated in the UI and verbosity is controlled with the |
I'm having difficulty getting Intellisense working in default mode. Currently the extension seems to be stuck in a "Parsing..." state. I've waited hours and this has not changed. Is there a way I can drill down and see logs of what the Intellisense engine is actually doing behind the scenes?
The text was updated successfully, but these errors were encountered: