Cannot save Eclipse debug configuration as shared file - eclipse

I'm creating a debug configuration for a new project. When I create it with Save as option set to Local file everything works fine.
But since I want to share the configuration via SVN I need to keep it as a file under the project directory so I change Save as to Shared file (with the default directory at project root). The configuration file appears on the hard drive as expected and debug works OK but after I restart Eclipse there is no debug configuration in the project and when I try to debug I get a message Launch configuration trunk CODS-MR at file:/home/saguna/workspace/trunk/MR.launch does not exist. although the file itself present and appears to have valid contents.
What seems to be the problem?
Thanks.

Related

Eclipse workspace corrupted after saving as zip

I have a need to share an eclipse workspace as a zip file. However, when I zip the workspace and then unzip it all of the user configuration is lost including the project that was opened in the workspace, what views are showing, and even a JBoss server that was created.
If I copy and paste the workspace everything works fine.
If I zip and unzip all of the configuration is lost (i.e. when I launch Eclipse and use the unzipped workspace Eclipse opens with all of the default settings including the welcome page).
What could be causing this and how do I get the zip to work?
I know there are other ways to export Eclipse configurations but I do have a specific requirement that this be provided as a zip file.
It looks like the problem was with the file names that started with ".". I re-zipped with WinZip instead of the built-in windows tool and everything is working now. See: blog.robertelder.org/zipping-corrupts-eclipse-workspace

Eclipse is not able to find sources during debug

I'm building my c/c++ application for arm controllers with gcc in a docker. There together with the .hex and .bin file also the .elf file is generated. Once generated they all are exported out from the container to the host machine. Now I would like to debug the application with openocd, arm-none-eabi-gdb and eclipse cdt. I'm able to start debug session on the target board, but when I stop the debugger (or it stops on its on at startup on main) it is not able to find the source files to show:
Can't find a source file at "/usr/src/Testbench/LIBS/Shell/shell.c"
The path here is the one of the build project in the docker container and has nothing to do with the new debug project on the host where all files are located now.
I tried to edit source lookup path in eclipse with no luck, I could find the file an then it worked for just that file. Also specifying the folders did not work. Anyway, doing it manually always for all files/folders in the project is not an option.
The solution should be "scripted" since all this is part of a CI/devops concept.
It seems that the "wrong" path is hard coded in the elf file. Is there a (scripted) way to change that path to match the actual project location so that eclipse and gdb just work as expected and the developper can see the debug info when debugging?
Possibly it should work on Linux and Windows ;-)
Thanks in advance for your help
Martin
Now it works! In eclipse in the debug configuration in the gdb commands I added :
set substitute-path /usr/src/ ${workspace_loc}
Then I had to go to the source lookup path in eclipse and remove everything.

How does Eclipse persist created/duplicated launch-configurations? DialogSettings?

I was wondering how Eclipse persists created or duplicated launch-configurations.
(When I restart Eclipse after creating or duplicating a launch-configuration, the configuration is still there)
Does Eclipse use the DialogSettings to store this user-created information?
Thanks for any answer!
All launches however they are created are normally stored in the workspace .metadata/.plugins/org.eclipse.debug.core/.launches directory in a xxx.launch file.
The format of the file does look similar to the DialogSettings file but in fact it is created by different code in org.eclipse.debug.internal.core.LaunchConfigurationInfo.
You normally access launches through the various ILaunchXXXXX interfaces, ILaunchManager being the main interface.
Depending if your launch is a Local file or a Shared file (see the launch configuration tab "Common").
If it is a Local file the configuration is stored in your eclipse workspace:
.metadata/.plugins/org.eclipse.debug.core/.launches
If it is a Shared file it is stored in the bundle/path of your workspace bundles, as .launch file.
If you duplicate a launch it is stored next to the original, e.g. in the .launches directory for Local file or in your bundle/path for Shared files.

Where are Run configurations stored?

I'm running Liclipse 2.5.3 on Mac OS. I renamed my project causing me to lose all my run configurations. When I tried recreating one, it says the file exists. However, there are no run configurations present.
Where are the run configs stored?
The normal location for launches is in the workspace in the
.metadata/.plugins/org.eclipse.debug.core/.launches
folder.
Each launch configuration is in a separate xxx.launch file which is a xml file.
You can also Export and Import launch configurations.
These configrations are located in .metadata/.plugins/org.eclipse.debug.core/.launches, and they are *.launch files.
Note that each workspace has its own .metadata folder.
#greg-449's answer tells you where they are stored, but you might be running into a situation where the launch configs for the renamed project are just being filtered/hidden. In the Launch Configurations dialog, there is a toolbar button to control filtering. Check there if deleted/unavailable projects are being filtered; if so try disabling that option and see if your missing configs come back into view.

Delete project from Netbeans list

Opening Netbeans IDE, it tries to scan the project in "Projects" window. For some reason the scan cannot be done and it freezes Netbeans.
How can I retrieve this project from the "Projects" list without opening the IDE, in the file system of Netbeans.
Thank you.
Note : windows environment, in an xml file maybe
Look for openProjectsDisplayNames and openProjectsURLs in the file config/Preferences/org/netbeans/modules/projectui.properties in the user configuration directory (see http://wiki.netbeans.org/FaqWhatIsUserdir )
Delete the ones corresponding to the project you want to avoid opening.
Another option would be to just delete the whole user configuration directory to reset your config. This might be necessary anyway if Netbeans is freezing for another reason.