microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.45k stars 1.53k forks source link

Intellisense doesn't work on windows case sensitive folders #12178

Open Raffaello opened 4 months ago

Raffaello commented 4 months ago

Environment

There is already an existing issue: https://github.com/Microsoft/vscode-cpptools/issues/1994 and a pre-release version: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.0

unfortunately it looks abandoned as it is more than 1 year with no progress and still in pre-release version. especially as my cpptool plugin is newer than that pre-release version

image

Bug Summary and Steps to Reproduce

Bug Summary: intellisense doesn'twork on windows with NTFS case sensitive attribute enabled

Steps to reproduce:

  1. enable case sensitive in a folder
  2. write some cpp code in that and use vscode cpp tools
  3. intellisense is just broken

Expected behavior:

it should work instead.

Configuration and Logs

.

Other Extensions

No response

Additional context

is there anything that can be done without switching to a pre-release version that is older than 1 year in respect of the latest one?

sean-mcmanus commented 4 months ago

@Raffaello The "fixed (release pending)" means it's either fixed and pending or fixed and released -- we don't have a fixed and released label. Have you tried setting C_Cpp.caseSensitiveFileSupport to "enabled"?

Raffaello commented 4 months ago

@Raffaello The "fixed (release pending)" means it's either fixed and pending or fixed and released -- we don't have a fixed and released label. Have you tried setting C_Cpp.caseSensitiveFileSupport to "enabled"?

ah. no, i will try it, thank you. sorry i thought it was something that could have been done automatically with VSCode/Extension automatically detecting if it is a case sensitive or not, or even query git config core.ignorecase bool. thanks i'll check it tomorrow.

Raffaello commented 4 months ago

@sean-mcmanus i tried with C_Cpp.caseSensitiveFileSupport to "enabled", but it doesn't look like it's working.

also i tried having a simple test: a README and a readme file, on the file system are present, on VSCode only one of the 2 is showed in the Explorer tab.

I don't think is related but not sure, just an extra info.

Anyway, thanks, on windows i will stick on not using case sensitive files as it might also have further problem with other 3rd party toolos.

sean-mcmanus commented 4 months ago

@Raffaello Yeah, it's possible some change broke that setting/feature.

bobbrow commented 4 months ago

README vs. readme in the VS Code Explorer sounds like a VS Code bug.

However, if you change the C++ setting for case sensitive files, you might also need to run the "Reset IntelliSense Database" command to ensure that you don't have stale information in there from before case sensitivity was changed. I thought we might have automatically done that for you, but looking at the code, that may not be the case.

If that doesn't help and you want to still try using case sensitive files, we'll need more details about what doesn't work.

Raffaello commented 4 months ago

I did that too(reset intellisense cache). Also restarted vscode. Tried for a while. At some point i realised it's not really worth it. A CI job can catch up easily an eventual case sensitive issue.