-
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
Incorrect IntelliSense Error on SSH remote: identifier "Point" is undefined #12455
Comments
Hi @ying-hua . Thanks for reporting this. I appreciate the clear repro steps. Unfortunately, I haven't been able to reproduce the behavior you're seeing. Would you be able to provide an example in the form of a zip file or a GitHub repro? That would further reduce the chance of differences in what we're doing to try to repro it. If it still doesn't repro for us, we may need to know more about your system and environment. Does the issue repro for you if you happen to also have Is it possible there could be another |
Hi @ying-hua . Since the scenario you're describing seems very simple, I'm suggesting there may be some additional details we would need to uncover to understand what's going wrong. Here is a recording of the very fist time opening the ctest folder you provided, on Windows and using WSL remoting to open the folder on an Ubuntu Linux 24.04 instance. Recording.2024-07-16.180423.mp4(The extension should operate the same way regardless of whether connected via WSL remoting or SSH remoting. The extension does not aware of how it's being remoted). This time following your more recent instructions, opening each file, closing some and resetting the database: Recording.2024-07-16.181228.mp4Let me know if I've done something different that you. One detail that confuses me is that your latest image shows squiggles on The fact that the issue is cleared up when the header is open would suggest it has something to do with IntelliSense failing to resolve includes. Is it possible that this entire folder is under a symbol link in the file system? Perhaps |
Hi @Colengms .Your operations is the same as mine. I have checked the file structure and there are no symbol link. I also install a vscode in my ubuntu and open the same workspace. The IntelliSense works perfectly. Here is my recording about squiggles on 20240718_163838.mp4 |
Hi @ying-hua . After opening files to cause the squiggles to clear up, if you do not reset the database, then reload the window, does the issue immediately recur? Or, do those squiggles not appear again until you reset the IntelliSense database? If you view the output channel when resetting the database, it should show that the main cpptools process is "tag parsing" files. Do you see any errors logged there? I suspect the problem may be that IntelliSense process (cpptools-srv) doesn't have permission to access files directly on disk, for some reason. When a file is opened for editing, its contents are provided to the extension, which would explain why things automatically get resolved when opening header files. Otherwise, it looks as if header files are found, but their contents not seen by the IntelliSense process. When remoting, VS Code installs files into a |
Does reverting back to v.1.16.3 fixes the squiggles? |
Thank you! Downgrading the extension to 1.16.3 solve the problem. But I don't know why, I don't change anything else. |
After I upgrade the extension to 1.20.3, the problem appears again. |
Re-opening. We are still seeking more information, so we can address this issue. @ying-hua , can you respond to the questions in my previous comment? |
OK, I reinstalled the 1.20.5 version. If I connect to ubuntu with the 3 files opened, the squiggles exist. But after I switch window to aaa.h, the squiggles disappear. Here is what happend. recoed1_20240723_163219.mp4There is a weird phenomenon. If I close the aaa.h and aaa.cpp and only rescan workspace, the squiggles exist but ctrl + click works. recoed2_20240723_163544.mp4Here are 2 logs. I delete |
Hi @ying-hua . Thanks for confirming that. Unfortunately, I'm not seeing any clues in your logs. The C/C++ Extension does not itself function differently when remoting. The fact that things work properly when using the system directly, and repros when remoting in with SSH, suggests that the problem is related to VS Code itself. However, the fact that the issue does not occur with prior versions of the C/C++ Extension, seems to point to the extension. I suspect the issue may have something to do with file system permissions for VS Code (and child processes) being somehow different for SSH than when running locally. Since the issue doesn't occur for everyone, it would seem to have something to do with how your system is configured. Do you have any other VS Code settings not mentioned in this issue? If so, can you provide those? Is there anything else special about the target system that might be different from the default systems I'm using? Do you have another remote system you could test your repro against? You might try remoting into the same remote system from another machine, or remoting into a different system, to see if you can isolate the problem to being specific to the host or the target. |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
main.cpp appears identifier "Point" is undefined error, Ctrl + Click doesn't work yet, but my header file is included correctly. It's ok when I run this command:
g++ -I xxx/include xxx/main.cpp xxx/include/aaa.cpp -o main
When I open the aaa.h file in the window, the error disappears and Ctrl + Click can jump to the aaa.h. But when I close the aaa.h file in window, reset intelliSense database and rescan Workspace, the error appears again.
Steps to reproduce:
Expected behavior:
No errors and Ctrl + Click works well.
Configuration and Logs
Other Extensions
No response
Additional context
My file struct
Other files
Screenshot
The text was updated successfully, but these errors were encountered: