Skip to content

Can't search Include path on a sshfs mounted directory #735

Description

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).

Activity

  1. sean-mcmanus commented on May 17, 2017

    @sean-mcmanus
    Contributor

    What OS is VS Code running on? Are you adding the path to browse.path?

  2. mianyuwang commented on May 17, 2017

    @mianyuwang
    Author

    Mac, yes, I added the path in both includePath and browse.path. Thanks!

  3. sean-mcmanus commented on May 18, 2017

    @sean-mcmanus
    Contributor

    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.

  4. mianyuwang commented on May 19, 2017

    @mianyuwang
    Author

    Sean McManus (@sean-mcmanus) I would love to help, how do I enable logging?

  5. sean-mcmanus commented on May 19, 2017

    @sean-mcmanus
    Contributor

    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 .

  6. mianyuwang commented on May 24, 2017

    @mianyuwang
    Author

    Created a folder in my home directory, set these two env variables accordingly, and restarted VSCODE, but it seems no log files were generated.

  7. sean-mcmanus commented on May 24, 2017

    @sean-mcmanus
    Contributor

    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.

  8. mianyuwang commented on May 24, 2017

    @mianyuwang
    Author

    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.

  9. sean-mcmanus commented on May 24, 2017

    @sean-mcmanus
    Contributor

    Do you see the sshfs path in the logs? It logs the directories that are traversed.

  10. bobbrow commented on May 24, 2017

    @bobbrow
    Contributor

    level 9 might be too verbose. level 7 should filter out a bunch of regex logging.

  11. mianyuwang commented on May 25, 2017

    @mianyuwang
    Author

    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.

  12. bobbrow commented on May 25, 2017

    @bobbrow
    Contributor

    0.11.2 only reverted the default intelliSenseEngine, so this was likely fixed by switching to a smaller mount.

  13. michelleangela commented on Aug 20, 2019

    @michelleangela
    Contributor

    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.

  14. locked and limited conversation to collaborators on Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions