Erich is Professor at Lucerne University of Applied Sciences and Arts and Distinguished Member of Technical Staff at Freescale Semiconductor. Erich has a MsCS degree and 18+ years of experience in the embedded software and tools world. He created many embedded cross C/C++ compilers and debuggers. Additionally he is researching in the domain of programming languages, real time and mechatronic systems. Erich is a DZone MVB and is not an employee of DZone and has posted 97 posts at DZone. You can read more from them at their website. View Full User Profile

Sharing Debug Configuration with Eclipse

03.18.2014
| 3259 views |
  • submit to reddit

Maybe you had this problem too: you shared a project with somebody, only to realize that your carefully crafted debug configuration was not shared?

Eclipse has the concept to store settings in the ‘framework’. The ‘framework’ is the Eclipse internal data, basically what is inside the .metadata folder of the workspace.

metadata folder in workspace

metadata folder in workspace

If I create a debug configuration for a project, then by default Eclipse stores it in the ‘framework’ (workspace data). This means that the debug configuration is *not* stored in the project settings: If I zip that project or share it with a version control system, then the debug configuration is *not* shared. In order to share the debug configuration, it needs to be stored in a physical file.

Sharing Debug Configuration File

For this, I need to enable ‘Shared file’ in the ‘Common’ tab of the debug configuration:

Shared Debug Configuration

Shared Debug Configuration

If I have multiple debug connections for my project, then the settings for each are stored in a separate .launch file:

Launch Configuration Files in Project

Launch Configuration Files in Project

If now I share the project, and that project gets opened with the .launch files, then the debug configurations will show up. :-)

Summary

To share debug (or launch) configurations with my project, then I need to enable ‘Shared file’ in the configuration: that way the configuration gets stored in a file inside the project.

Happy Sharing :-)

Published at DZone with permission of Erich Styger, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags: