-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
C_Cpp.SwitchHeaderSource does not work anymore #541
Comments
I'm not able to repro the bug. I suspect another extension is interfering by having another Alt+O command. You can also try right-clicking ad selecting the Switch Header/Source option. Can you repro the bug with the other extensions disabled? |
I'm suffering this same issue. In my case the language service crashes 3 times or 5 (I'm not sure) and a message popup at the top saying that the service wasn't going to be restarted again. Is there a way to restart the language service? Can I share some information that might be useful to you? (e.g. a crash log/memory dump?) |
I just installed Visual Studio Code (stable) on a different machine (Windows 10 this time). Is there any console or log where I might see a warning or error message? |
Have you explicitly opened a folder, or just the individual files? Many of our extension's features are expecting you to open a folder first. This defines the ${workspaceRoot} variable among other things. We'll add a backlog item to display some sort of message if you try to use a feature that depends on a folder being open. |
I just opened individual files, not a folder. |
We changed the implementation to require the browse database. Is there a reason you don't open the folder the file is in instead? The open file scenario has been low priority for us, so lots of features don't work with it. It's possible we could get it working though. |
Well, I primarily use Visual Studio (the IDE) for development. But since I have to work with many C++ projects, I often use VS Code to look up something in a specific file that is currently not loaded in a Visual Studio instance. I'd very much appreciate it if that feature would work without opening a folder again. |
Maybe related, I think this feature should work in a simple way: 1) check if there is a file with the same title but with the other extension in the same directory, 2) if that is not the case and we have a folder open, use the new logic. Here is an example about some weird behavior when there are several candidates for the same Instead of selecting the obvious option |
@dacap If you're getting a crash, can you attach a debugger and get a dmp? We're still trying to figure out why we're not getting any crash dmps on Windows. |
@sean-mcmanus In my case, I'm on macOS, I've several |
Can you email them to c_cpp_support@microsoft.com ? |
I've just sent them, I hope it helps! |
We just released 0.10.4 with some improvements for switch header/source. Can you install the update and let us know if we've resolved your issues? |
Yes, the issue is fixed with the latest version. |
I have this problem in 2018. can't switch by either Alt+O or right click menu. both these folders exist in browse.path and includePath of c_cpp_properties.json Any clues? |
Same here, I have the same, unable to switch header/source, with version 1.32.2 on Windows 10. |
After opening a .cpp or .hpp file, switching to the respective other file via Alt+O does not work anymore.
Both files are located in the same folder, next to each other.
Source file extension: .cpp
Header file extension: .hpp
Pressing Ctrl+Shift+P and selecting "Switch header/source" does not work either.
Steps to Reproduce:
The file MyClass.cpp is not opened.
The text was updated successfully, but these errors were encountered: