-->

MacGPSBabel Debugging and Command Line Access

Sometimes (especially when debugging) it's useful to bypass the Applescript part of MacGPSBabel and talk to GPSBabel directly. Jeremy Atherton offers these approaches:
  1. From the GUI: the key combination Apple-Option-v will bring up a debug window. If you leave the debug window open whilst using MacGPSBabel, it will output a report with some (hopefully) useful information after each file conversion. You can also enter commands for gpsbabel directly: enter the command at the top of the debug window, making sure that you include the full POSIX path to each file e.g. a file called myfile.gpx on your desktop would be ~/Desktop/myfile.gpx
  2. From the terminal application: this is the preferred method for using gpsbabel from the command-line. You will find the terminal application in your Applications/Utilities folder. Open the terminal up and type cd then press space and then drag the MacGPSBabel icon and drop it onto the terminal window, then press enter. Now type cd Contents/Resources and hit return. Now you can enter gpsbabel commands, but you need to start them ./gpsbabel rather than just gpsbabel and you need to use the full path to each file.
If you need to run gpsbabel from the command line a lot, then copy it out of the Contents/Resources folder to somewhere more easily accessible. For example: cp gpsbabel ~/Desktop will put it onto your desktop. If you put all of the relevant files onto your desktop and do cd ~/Desktop then cammands such as: ./gpsbabel -D9 -i gpx -f yourfile.gpx -o garmin -F usb: will work as advertised.