-
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
Go to Definition is not correct! It go to the .h file, not source file #1332
Comments
We need more repro details. Go to Definition on a newly added definition only works after you save a file. Also, the feature returns all matching results from the symbol parsing and doesn't yet use the IntelliSense compiler to choose the correct definition. Are you able to get the correct definition to appear in the list of Go to targets? The feature also doesn't work on local variables yet. |
@sean-mcmanus I have exactly same problem. |
back to cpptools 0.13.0, it works well. |
@michaelllh Does the lastest update fix your issue? https://github.com/Microsoft/vscode-cpptools/releases/latest . We're still have some issues if your file has UTF-8 characters > 1 byte: #1439 |
Using cpptols 0.17.4 Project : https://files.fm/u/zsnyk2j9 Steps to reproduce (In Linux based):
We observe that it goes to the test.h file but not to the test.c source. Going to the actually symbol definition is really important. Could contribute but don't know how to start. |
@brianignacio5 It works if you use
There are long-standing bugs on these issues (issues exist on GitHub):
We might be able to fix issue 2 in June and 1 in July (depending on other priorities). |
Thanks for your reply @sean-mcmanus !! Following up on browse.path functionality, would we be able to obtain the compiled .c source files from the compile_commands.json? Having just the list of directories can present conflicts on mutually exclusive sources ( which are selected upon different settings). |
@brianignacio5 Yeah, I think we should be able to parse only the source files listed in the compile_commands.json. The 2nd issue should be fixed in our next release. |
This issue appears to be a duplicate of another issue: #1715 |
Editing C/C++ file,choose function and goto the definition, it won't go to the right definition, some time it go to .h file,But I really define it in the project .c file.
The text was updated successfully, but these errors were encountered: