Skip to content
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

Cannot open declaration (IEP-1313) #1036

Open
MrDuby opened this issue Aug 25, 2024 · 18 comments
Open

Cannot open declaration (IEP-1313) #1036

MrDuby opened this issue Aug 25, 2024 · 18 comments

Comments

@MrDuby
Copy link

MrDuby commented Aug 25, 2024

Describe the bug
I installed the Eclipse base ide, Espressif IDE v3.0.0 on windows 10 professional. When I start a project or import any project I have no way to open function or variable declaration. On right click I cannot even find the option "Open Declaration" in the menu. Tried CTRL+click but I'm not even getting the Hyperlink to click to find declaration. When I select lets say the function and press F3 I get a pop-up message saying "The operation is not applicable to the current selection. Select a hyperlink target". The code compiles correctly though.

@github-actions github-actions bot changed the title Cannot open declaration Cannot open declaration (IEP-1313) Aug 25, 2024
@kolipakakondal
Copy link
Collaborator

Hi @MrDuby Could you please check this #995 (comment)

@amin352
Copy link

amin352 commented Aug 26, 2024

I have the same problem and I do many ways to solve the problem include the way you said in other topic, but the problem still remain.
I can't open declaration in any way and the open declaration in Navigate tab also is not usable and is off
please help

@MrDuby
Copy link
Author

MrDuby commented Aug 27, 2024

This is how I finally solved it.
I downloaded the offline installer(Espressif-IDE 3.0.0 with ESP-IDF v5.2.2) and no more the online installer(Universal Online Installer 2.28). After the installation I had to also go to IDE toolbar->Espessif->ESP-IDF Manager then Add ESP-IDF
image

@amin352
Copy link

amin352 commented Aug 28, 2024

This is how I finally solved it. I downloaded the offline installer(Espressif-IDE 3.0.0 with ESP-IDF v5.2.2) and no more the online installer(Universal Online Installer 2.28). After the installation I had to also go to IDE toolbar->Espessif->ESP-IDF Manager then Add ESP-IDF image

Thanks for your solution
I apply it and it works finally, BUUUUUT after closing ide again the problem still exist and not solving either

@Ignisuti
Copy link

None of these solutions work for me.

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented Nov 19, 2024

Hi @Ignisuti Could you please share an error log and LSP log?

Error log https://preview-docs.espressif.com/projects/espressif-ide/en/latest/troubleshooting.html?#error-log

LSP logs can be enabled from the preferences.

Screenshot 2024-11-19 at 11 30 49 AM

@Ignisuti
Copy link

I'm not sure how to send the log. This is what I have in my settings. However, there are no files at this location. I've restarted Eclipsed and re-compiled.

Screenshot 2024-11-19 001238

@kolipakakondal
Copy link
Collaborator

I'm not sure how to send the log. This is what I have in my settings. However, there are no files at this location. I've restarted Eclipsed and re-compiled.

Screenshot 2024-11-19 001238

Please navigate to the location mentioned in the dialog.

ex:
/Users/myuser/workspace-devcon/languageServers-log/org.eclipse.cdt.lsp.server.log

@Ignisuti
Copy link

Sorry, I wasn't more clear in my response. Yes, I have navigated there and only see an empty folder.

@ua100k
Copy link

ua100k commented Nov 22, 2024

Same problem here. with 3.0. Previous versions have no issues.

@Ignisuti
Copy link

Espressif, if you're listening, you have free developers, like myself, at your disposal to help you better understand this issue. Please just tell us what data you need to troubleshoot this and how to get it, and we'll try to get it to you.

I tried to provide the log, but Eclipse isn't outputting the log. So, maybe that's where we need to troubleshoot first...

@sigmaaa
Copy link
Collaborator

sigmaaa commented Nov 25, 2024

Hi @Ignisuti,

The logs could also be viewed in the console. Can you see them there? Make sure to switch to the language server console first like here:

Language.server.console.mp4

Also, please take a look if clangd settings are set:
Example:
image

Here are short explanations of these variables:

  • Path: This should be set up automatically after tool installation. If it's not, try clicking Restore Defaults on the clangd preference page.
  • Drivers: This setting depends on the target selected in the launch bar. If it’s empty, try reselecting the target; for example, select ESP32-S2, then switch back to ESP32.
  • Additional Settings: These options are used for source navigation and are configured automatically after building the project.

Also, after building the project "C/C++ Language Server" process runs inside the IDE, and you can track it in the bottom right corner of the IDE. After this process finishes you should able to open declarations.

@Ignisuti
Copy link

I do not have the Language Servers option in my console.
20241125_113018

I'm not familiar with clangd, but based on what you have said, I believe mine is setup correctly.
Untitled

@sigmaaa
Copy link
Collaborator

sigmaaa commented Nov 29, 2024

Hi @Ignisuti,

would it be possible to connect on MS Teams to work through this issue together? The problem is quite unusual, and we have not been able to reproduce it on our end. If this works for you, please write to [email protected] with your time zone and a suitable time. We will then send you an invite.

Best regards,
Denys

@kolipakakondal
Copy link
Collaborator

Error log https://preview-docs.espressif.com/projects/espressif-ide/en/latest/troubleshooting.html?#error-log

Can you please share an error log?

Most likely, the clangd server might be failing during processing.

@Ignisuti
Copy link

Ignisuti commented Dec 2, 2024

Update...
I have worked with Denys and he discovered the following solution:

1.) I had turned on my Indexer during troubleshoot. It needed to be re-disabled.
2.) These 3 options for the LSP Editor were NOT enabled by default. Enabling these fixed my issue.
Screenshot 2024-12-02 130843

@ua100k
Copy link

ua100k commented Dec 2, 2024

This has no effect on my system. The language were enabled already. In previous editions, the index was enabled and no option for language servers are available in preferences. Not sure if that is helpful.

@sigmaaa
Copy link
Collaborator

sigmaaa commented Dec 2, 2024

This has no effect on my system. The language were enabled already. In previous editions, the index was enabled and no option for language servers are available in preferences. Not sure if that is helpful.

Hi @ua100k,

The LSP editor was included to the IDE in the version 3.0.0 and higher and was intended to replace default C/C++ editor. Could you share what your preference is for clangd? Like here
image

Also, make sure that you are opening c/c++ files with LSP editor (right-click on the file -> open with C/C++ Editor (LSP)). Or just set this in the preferences like this:
image

Please note that after building the project, the C/C++ Language Server should appear as running in the bottom-right corner for a short period. Once this process completes, you can use Ctrl + Left Click (default) to open declarations.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants