You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't search Include path on a sshfs mounted directory #735
My include path is on a local directory actually mounted to a corporate remote server via sshfs, so that they can be accessed locally, I have no problem editing file there. However when I add this path into c_cpp_properties.json includePath, it keeps searching include path for a few minutes, then ends up "Include file not found in include path" error, and also that directory is unpleasantly unmounted (probably crashed sshfs process).
I setup sshfs on Linux and got include paths successfully. Usually Linux and Mac are similar -- we call the same nftw API to do the directory walking, but there are different versions of it, so maybe your Mac version has some issue (my Mac had an old version). I tried sshfs on Mac, but I couldn't get it to work, so we'll have to investigate more later. After we ship our next update, it's possible the issue could get fixed, but if not you could enable logging on the smallest possible folder and send us the logs, but it's possible we'll need to add more logging in the update after that.
Are you using 0.11.1 of cpptools? When you open a new terminal and type "env" do you see the variables? Are you setting the env variable via modifying the .bash_profile? Logging works on the 3 Mac machines I've tried.
Not sure if 0.11.2 fixed the issue, but I do observe some issue on my original sshfs mount, it contains too many headers, 158832, I can ls one or a few files using wildcard, but a full ls also timed out sshfs and caused device unmounted, probably sshfs limitation. After I switched to a smaller sshfs mount, it works for me now. Thanks a lot! VSCODE and this extension are awesome.
Closing this issue due to long inactivity. If you update to the latest version of the C/C++ extension and your issue still persists, please re-open the issue and reply with additional information that can help us investigate the issue.
Activity
sean-mcmanus commentedon May 17, 2017
What OS is VS Code running on? Are you adding the path to browse.path?
mianyuwang commentedon May 17, 2017
Mac, yes, I added the path in both includePath and browse.path. Thanks!
sean-mcmanus commentedon May 18, 2017
I setup sshfs on Linux and got include paths successfully. Usually Linux and Mac are similar -- we call the same nftw API to do the directory walking, but there are different versions of it, so maybe your Mac version has some issue (my Mac had an old version). I tried sshfs on Mac, but I couldn't get it to work, so we'll have to investigate more later. After we ship our next update, it's possible the issue could get fixed, but if not you could enable logging on the smallest possible folder and send us the logs, but it's possible we'll need to add more logging in the update after that.
mianyuwang commentedon May 19, 2017
Sean McManus (@sean-mcmanus) I would love to help, how do I enable logging?
sean-mcmanus commentedon May 19, 2017
Add the env variables to enable logging:
VSCODE_CPP_LOGDIR=<path>VSCODE_CPP_LOGFILE_LEVEL=9. You can lower the logging level to 1 if you want less output. Here's an article that describes how to add env variables on Mac: https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x .mianyuwang commentedon May 24, 2017
Created a folder in my home directory, set these two env variables accordingly, and restarted VSCODE, but it seems no log files were generated.
sean-mcmanus commentedon May 24, 2017
Are you using 0.11.1 of cpptools? When you open a new terminal and type "env" do you see the variables? Are you setting the env variable via modifying the .bash_profile? Logging works on the 3 Mac machines I've tried.
mianyuwang commentedon May 24, 2017
Yeah, my mistake. Now I am getting logs, but it seems it doesn't contain too many useful information about the error, all about path split.
sean-mcmanus commentedon May 24, 2017
Do you see the sshfs path in the logs? It logs the directories that are traversed.
bobbrow commentedon May 24, 2017
level 9 might be too verbose. level 7 should filter out a bunch of regex logging.
mianyuwang commentedon May 25, 2017
Not sure if 0.11.2 fixed the issue, but I do observe some issue on my original sshfs mount, it contains too many headers, 158832, I can ls one or a few files using wildcard, but a full ls also timed out sshfs and caused device unmounted, probably sshfs limitation. After I switched to a smaller sshfs mount, it works for me now. Thanks a lot! VSCODE and this extension are awesome.
bobbrow commentedon May 25, 2017
0.11.2 only reverted the default intelliSenseEngine, so this was likely fixed by switching to a smaller mount.
michelleangela commentedon Aug 20, 2019
Closing this issue due to long inactivity. If you update to the latest version of the C/C++ extension and your issue still persists, please re-open the issue and reply with additional information that can help us investigate the issue.