"No symbols found" when I press Ctrl+Shift+o with a long c++ file, such as : https://raw.githubusercontent.com/opencv/opencv/master/modules/imgproc/include/opencv2/imgproc.hpp .
For other files symbols are fine.
And if I delete some lines in this long file, symbols are fine.
OS: Ubuntu 17.04
$ uname -a
Linux P310 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
VSCode version:
$ code --version
1.17.1
C/C++ extension:
# C/C++ for Visual Studio Code Change Log
Version 0.14.0: October 19, 2017
I have the same problem,
Before VSCode 1.18.0, only hovering tooltip is still working on big files, Go to/Peek Definition, Go to/Peek declaration didn't work.
After updating to VSCode 1.18.0 this morning, hovering is death (maybe related to https://github.com/Microsoft/vscode/issues/37873). In addition, despite the include path is the same, now all included headers are in problems panel.
Now I am relying on C++ Intellisense .
@wkevin Sorry for taking so long to investigate this. I'm able to repro it. The behavior is very strange. I'm investigating...
Our tag parser is just failing, which isn't particularly strange (we don't own that code and it's shared with VS 2017), but we had another bug which would cause the file to continuous fail to parse until a Reset IntelliSense Database is used, even after all the contents were deleted, which I've fixed (https://github.com/Microsoft/vscode-cpptools/issues/1367 ). I'm still looking into the cause of the tag parse failure...
@wkevin The failure is caused by line 3044 in the comment block u' \leftarrow x {f'}_x + {c'}_x \\ (it doesn't like anything with \\u). It is causing our parser to fail -- I guess it's parsing comments so it can potentially provide type info for identifiers in comments. We should be able to get a fix, but I don't have a solid ETA yet.
@sean-mcmanus
Great to hear that this issue is not forgotten.
Oh, the bug has been fixed for our Jan. release. The cause was actually https://github.com/Microsoft/vscode-cpptools/issues/1367 . The \u error doesn't actually matter, it was just triggering the other bug.
@LeThiHyVong Your issue could be different, but there is a significant chance that it is the same issue, because it would occur in many scenarios.
Downgrading to cpptools 0.13.0 resolves this problem. Hope it helps.
https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/cpptools/0.13.0/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
We have a pre-release with the fix if you want to try it out (https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.14.6-insiders) and let us know if you're still having problems with symbols not being found. It's possible you may need to do a Reset IntelliSense Database or at least edit the file which has the missing symbols in it so the database timestamp is incremented.
@wkevin Your issue should be fixed now: https://github.com/Microsoft/vscode-cpptools/releases/latest, unless your file has UTF-8 characters > 1, which is being track by https://github.com/Microsoft/vscode-cpptools/issues/1439 .
Most helpful comment
@wkevin The failure is caused by line 3044 in the comment block
u' \leftarrow x {f'}_x + {c'}_x \\(it doesn't like anything with\\u). It is causing our parser to fail -- I guess it's parsing comments so it can potentially provide type info for identifiers in comments. We should be able to get a fix, but I don't have a solid ETA yet.