Using the GPS Debugger

As an alternative to using the GNATbench debugger, you have the option of launching the GPS debugger from Eclipse. This option may be attractive for users who are more familiar with or prefer the GPS debugger.

To debug your application under GPS, you need to create a new debug configuration, just as if you were going to use the built-in debugger. First, select "Open Debug Dialog..." from the Run menu, or click on the down-arrow next to the Debug button on the toolbar and make the same selection there.

Second, in the left hand pane of the Debug dialog, double click on "GPS debugger." You will then need to configure the name of the project to use and executable to run. You should see something like the following after pressing the Apply button:

Launching GPS.

You can now launch a GPS debug session by pressing "Apply" (if you have not already done so) and then "Debug".

Troubleshooting

If your GPS debugger session does not open the file in the source editor and instead indicates a strange file name in the GPS debugger console for the "file" command, it may be that you have one or more blanks in the path to the file. This is an easy situation to get into on Windows because of the blanks in the actual pathnames for the Desktop, "My Documents", and so on. For example, the typical pathname used for items located on the Windows desktop is "C:\Documents and Settings\user-name\Desktop\item-name".

For that same reason you may instead see a simple error dialog box pop up, titled "Launching", when you attempt to launch a GPS configuration. In this case GPS is not even started.

Assuming that removing these blanks is difficult, the alternative is to invoke GPS externally and select (browse to) the GNAT project file, then enter the debug mode from within GPS. (See the GPS User's Guide for details regarding the GPS debugger.)