Developer Setup: Debugging in Eclipse for Windows

Note: The steps below allow you to use the graphical debugger in Eclipse in a Windows PC environment to debug XCSoar.
As with all Eclipse wiki pages for XCSoar, please consider that Eclipse is not required for any part of development for XCSoar -- you can also debug XCSoar from the command line.

1) Install Eclipse

Follow steps to install and configure Eclipse on your Windows PC as described in:
http://xcsoar.org/trac/wiki/Advanced/Development/Setup/WindowsEclipse

2) Compile XCSoar

Use the Eclipse menu, "Project > Build" as described in Windows Eclipse setup page linked to in the step above to build XCSoar

Note: the command line may include the parameter "DEBUG=n". Don't worry, this is ok and does not prevent debugging in Eclipse.

3) Configure the Eclipse IDE to debug XCSoar

Click the "Run > Debug Configurations" menu

  • Click the "Search Project" button and select the XCSoar-ns.exe executable. This is the executable with the debugging information in it.

  • Click the "Debugger" tab.
  • In the "Debugger" dropdown window, select the "MinGW gdb debugger" option
  • In the GDB Debugger field, click the "Browse" button and select the "C:\msysgit\msysgit\mingw\bin\gdb.exe" debugger. (Note the path may be slightly different on you machine)

  • Click the "Close" button to save your changes

4) Debugging

  • Start the debugger by clicking "Run > Debug." It should use the configuration you just made.
  • Click the Toolbar button with the "C" on it to show the project explorer to allow you to open you the XCSoar project files, so you can set breakpoints.

Next steps

  • You should now be able to start debug XCSoar in Eclipse using the MinGW GDB debugger, set breakpoints and evaluate expressions and variables using the Eclipse IDE.
  • Visit Advanced/Development/Setup/WindowsEclipse/EGit? to learn about the Git abilities of Eclipse

Attachments