Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart(Eclipse CDT 03-2021 Indexer Fails/Works When Run/Debug Configuration. Requires Restart of Eclipse (?))
Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1842617] Fri, 25 June 2021 15:12 Go to next message
Brian Piccioni is currently offline Brian PiccioniFriend
Messages: 3
Registered: June 2021
Junior Member
I am using Eclipse CDT 03-2021 with the ESP-IDF Plugin. The plugin does not seem compatible with 06-2021 but the described behaviour is the same. This seems to be a common problem.

Switching from run to debug configuration or vice-verse results in unresolved includes even though it will build with no errors, suggesting the indexer is not in synch with the source. Reindexing, "clean", etc., does not help. Usually a change in configuration immediately results in index issues but if it does not a re-index or build all always does.

Switching back does not fix the indexer. I.e. if you start Eclipse with the run config, switch to debug, then back to run the indexer still fails.

If debug works and I change to run, I get the same problem. I have to switch configurations because of an unfixed bug in the OpenOCD-ESP. Because of the indexer issue I have to

1) Switch to Run config to program the device
2) Close Eclipse
3) Open Eclipse and start the debug session.

This is tedious.

Below is a summary of the log files of a failing and working index

Note that the working index has an Include Search Path (option -I). I cannot find where to set the Include Search Path option for the indexer. In prior projects when I had unresolved includes (i.e. compile failures) there was an option for "Include Paths" but that is not present in the project or window properties, likely because this is a cmake project.


****Fails****
Project: SoftAP1
File: file:/C:/Users/bjpic/eclipse-windows/SoftAP1/main/softap_example_main.c
Language: GNU C
Index Version: 219.0
Build Configuration: Configuration
Context: file:/C:/Users/bjpic/eclipse-windows/SoftAP1/main/softap_example_main.c
C, {}
Versions in Index: 1
C: {}; 4 macros, 10 includes, 46 names;

Macro definitions (from language + headers in index):

****Works****
Project: SoftAP1
File: file:/C:/Users/bjpic/eclipse-windows/SoftAP1/main/softap_example_main.c
Language: GNU C
Index Version: 219.0
Build Configuration: Configuration
Context: file:/C:/Users/bjpic/eclipse-windows/SoftAP1/main/softap_example_main.c
C, {}
Versions in Index: 1
C: {}; 4 macros, 10 includes, 512 names;

Include Search Path (option -I):
*********************************************

This is the contents of the project indexer preferences org.eclipse.cdt.core.prj-SoftAP1.prefs but I have tried numerous permutations thereof.

eclipse.preferences.version=1
indexer/indexAllFiles=false
indexer/indexAllHeaderVersions=false
indexer/indexAllVersionsSpecificHeaders=
indexer/indexOnOpen=true
indexer/indexUnusedHeadersWithAlternateLang=false
indexer/indexUnusedHeadersWithDefaultLang=false
indexer/indexerId=org.eclipse.cdt.core.fastIndexer
indexer/preferenceScope=0
indexer/skipFilesLargerThanMB=8
indexer/skipImplicitReferences=false
indexer/skipIncludedFilesLargerThanMB=16
indexer/skipMacroReferences=false
indexer/skipReferences=false
indexer/skipTypeReferences=false
indexer/useHeuristicIncludeResolution=false


Thanks
Re: Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1842641 is a reply to message #1842617] Sat, 26 June 2021 06:53 Go to previous messageGo to next message
David VavraFriend
Messages: 1407
Registered: October 2012
Senior Member
In CDT as shipped, run/debug configurations are used to launch executables.
By this I mean the configurations accessed through
Run --> Run configurations and
Run --> Debug configurations
They are unique by Name.
A run launch configuration with Name==X is the same as a debug launch configuration with Name==X
The only thing that differs between run/debug configurations are the dialogs for changing them.

Are these the Run/Debug configurations you are referring to?
If so, they have nothing to do with the Indexer.
But then, you are using a third party add-on to CDT.
The designers of that would be more likely to help you.
According to the ESP-IDF Programming Guide at
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/resources.html
there is a forum for addressing issues with ESP-IDF at https://esp32.com/
and there is a list of issues at https://github.com/espressif/esp-idf/issues


You might get an answer here, though,
but you should post the exact steps leading to your problem.
It would also be helpful if you could recreate the issue with a very small project.
Preferably one that doesn't depend on plugins.

[Updated on: Sat, 26 June 2021 07:26]

Report message to a moderator

Re: Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1842646 is a reply to message #1842641] Sat, 26 June 2021 13:00 Go to previous messageGo to next message
Brian Piccioni is currently offline Brian PiccioniFriend
Messages: 3
Registered: June 2021
Junior Member
David

Thanks for the reply.

There are a number of posts elsewhere where people have complained that Eclipse projects derived from cmake compile but show unresolved includes. These are not ESP-32 related.

I'll try raise the issue with the ESP-32 forum but in general they are very short on solutions. I have several actual issues raised there, including basic things like "following the instructions to build does not work" are there is no reply.

I was hopeful that since the indexer is an Eclipse component and the problem arises from a missing option to the indexer I might get help here.

Brian
Re: Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1844145 is a reply to message #1842646] Fri, 03 September 2021 02:00 Go to previous messageGo to next message
Stephen Linder is currently offline Stephen LinderFriend
Messages: 2
Registered: September 2021
Junior Member
I have the same problem. I am also using the Espressif's esp-idf tool chain.

Before I switched to debug mode I had no errors from the Indexer. I could click on a #define 'd constant and I would be taken to where it was declared.

Nothing worked after I switched to debugging the project. No real point using an IDE when most of the functionality is gone.

Stephen
Re: Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1844168 is a reply to message #1844145] Fri, 03 September 2021 21:44 Go to previous messageGo to next message
Brian Piccioni is currently offline Brian PiccioniFriend
Messages: 3
Registered: June 2021
Junior Member
They have fixed it (I am working on other software to talk to the ESP32 at the moment).

Failing that, a fix is to delete the project build directory and re-build the project. This is only needed when you switch between debug and run configurations, which I don't do that often since I am either working on the code (debugging) or finished (build). There is some overhead for the debug version but it is not too bad.
Re: Indexer Fails on Change of Run/Debug Configuration. Requires Eclipse Restart [message #1844244 is a reply to message #1844168] Tue, 07 September 2021 05:24 Go to previous message
Kondal Kolipaka is currently offline Kondal KolipakaFriend
Messages: 9
Registered: July 2009
Junior Member
This is fixed with the recent version esp-idf eclipse plugin v2.2.0
Previous Topic:Build not configured correctly
Next Topic:Configure BCC32C & BCC32X In Eclipse
Goto Forum:
  


Current Time: Tue Dec 07 22:31:46 GMT 2021

Powered by FUDForum. Page generated in 0.02384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top