Why don't LOG files work as described under DEBUGGING ?

I am using Eclipse.

I select Build for Device Wizard

I do not check the box that says "Build release version of the project"

I build and get a .PRG file

Copy that file to /GARMIN/APPS

Go to /GARMIN/APPS/LOGS and create a text file APPNAME.TXT  (with my app name that matches the .PRG file).

I run the app on the watch, reconnect the watch to my computer, and look at the contents of APPNAME.TXT.

Nothing... empty, yet when I run the app in Eclipse using the simulator, the Sys.println()  output appears in the console as expected.

Can anyone tell me what the trick is to getting text output to go into a log file as described under Basic Debugging ????

  • Maybe this is a dumb question on my end, but are you sure that your PRG file isn't being automatically renamed by the device after you copy it? That can happen in a couple of cases IIRC:

    - if the filename is longer than 8.3 chars

    - if the store version of the app is already installed

  • Things are also case sensitive on some devices, so make sure the case matches.  MYAPP.TXT isn't the same as MyApp.TXT

  • Thanks Jim.

    I've made sure that the names match (see above).

    Still nothing being written to the .TXT file.

  • As another sanity check, you could try to test the text file logging with the simulator.

    1) Build and run app in sim

    2) Open your sim's device folder:

    Windows: %TEMP%\GARMIN

    Mac/Linux (I think): %TMPDIR%/GARMIN

    3) Navigate to GARMIN/APPS and check the filename of the built app

    4) Create the corresponding text file in GARMIN/APPS/LOGS

    I'm sure it'll work, but it's just another data point so you can be sure that it's a problem with the device. Might also help if you posted your device model and firmware version.

  • I am encountering the same issue now. Sometimes it has while sometimes not.

  • I found the prg would be renamed to a un-human-readable format like BC4d1517.PRG. So we should use BC4d1517.txt to generate the debug log. How to tell the new install prg? Check the last modified time

  • If you first uninstall the store version, it will keep the name of your sideload.  

  • Oh,no wonder I sometimes see the content of txt

  • Maybe this will help someone. I started my watchface by using the basic watch face template generated by vs code. Had a look in the manifest.xml file and saw that it pulls the name from strings.xml where it was still BasicWatchFace.

    I'm not sure how often the logs get saved, that might also be a reason.

    I also have weird caching issue on my watch where the prg keeps getting shown / renamed as a previously named version.

    Alos not sure if building as debug is required for logging to work.

  • The easiest thing is to uninstall an app store version before copying on a sideload.  The renaming is the app store name for the prg.

    You can also find the name on the watch in garmin/garmindevice.xml (search this forum for tricks with that)

    You don't need to do a debug build.